![]() ![]() # Dialog to enter the computer name and the create $COMPUTERNAME variable Taken me long enough but finally found what I wrote to do all this! #!/bin/bashĬD="/private/tmp/CocoaDialog.app/Contents/MacOS/CocoaDialog" ![]() ![]() usr/local/jamf/bin/jamf policy -event rebind #Rebind to Active Directory assuming you have a directory binding in your JSS usr/sbin/dsconfigad -force -remove -u noaccountneeded -p nopasswordneeded #Run an inventory update to reflect name change in the JSS. usr/sbin/scutil -set LocalHostName "$result" usr/sbin/scutil -set ComputerName "$result" #Change computer name, local hostname, and hostname with user provided input. Result=$(echo $ComputerName | sed -e 's/1 //g') Enter in Computer Name to Rename WithĬomputerName=$(/Applications/Utilities/CocoaDialog.app/Contents/MacOS/CocoaDialog inputbox -title "Rename Computer" -informative-text "Enter Computer Name" -button1 "Rename" -button2 "Cancel") You do need Cocoa Dialog installed in the path below. This script is used to change the computer name, hostname, computer name is the JSS, and in Active Directory. To change it in AD and MAC OS the following script will work. ![]() The process above by will just rename in on the MAC OS level. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |