CUT-4138 - Update Rename Local Username macOS Scripts
What does this solve?
This change updates the series of commands issued to restart a device after changing a local username. Depending on how the script was run, the previous version might not execute correctly. This version of the script can be executed through a JumpCloud command. The command will finish and show an exit code of 0 assuming all other changes were successful.
Is there anything particularly tricky?
NA
How should this be tested?
Create a macOS command in JumpCloud upload this script to the script file contents.
Setup a macOS device with some local account with an account name like localUser
set the command body to change the account name localuser to 'newlocaluser`
Execute the command on that device with the localUser account.
The command should complete with an exit 0 status and should have changed the username of the localUser account to be newLocalUser. The computer should restart after 1 min. When logging in as the new user, the account should look the exact same as before the rename.
Issues
What does this solve?
This change updates the series of commands issued to restart a device after changing a local username. Depending on how the script was run, the previous version might not execute correctly. This version of the script can be executed through a JumpCloud command. The command will finish and show an exit code of 0 assuming all other changes were successful.
Is there anything particularly tricky?
NA
How should this be tested?
localUser
localuser
to 'newlocaluser`localUser
account.localUser
account to benewLocalUser
. The computer should restart after 1 min. When logging in as the new user, the account should look the exact same as before the rename.Screenshots