If it doesn't, it's something else but we dont care what it is, we just care that it wasn't 0. So different exit codes based off different results.īasically in the small script example I initially posted, if login succeeds the exit code is 0. XX2 - Button 2 was clicked with a value of XX seconds selected in the drop-downĢ43 - The window timed-out with no buttons on the screen XX1 - Button 1 was clicked with a value of XX seconds selected in the drop-down Return Values: The JAMF Helper will print the following return values to stdout. A good example or sort of explanation is if you run jamfHelper "/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -help" At the bottom of the help it says. Sometimes programs or scripts will do a different exit code so you know sort of why it failed. $? will give you the exit code of a command. passwd /Users/"$"Įcho " Local Management Account - password passed to JSS! "Įcho " You are trying to change the wrong account. #Change management account locally on mac #Check that we are changing ONLY for remoteadmin create /Users/username and then hit enter. The Script below works but as you can see its not very 'clever' :-) Now, follow these steps to make a new administrator account: Type in sudo dscl. But, I want to know how to check if the currentPwd already matches the newPwd, and if so then it must exit. I'm running a very basic script, which works, to change the local admin password on all our Macs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |