User changed uniquename, unable to login to system

Cannot Log into MiWorkspace Mac After Uniqname Change

Objective

Make changes to a MiWorkspace Macintosh computer so that a user who has had their uniqname changed can once again login to the computer account and access their home folder. 

Environment

When a user has their uniqname changed, they may find that they are no longer able to login to a MiWorkspace Macintosh computer that they had previously logged into.

Procedure

  1. Verify you have a known working disk password if the system is encrypted!

  2. Login to the computer using your M-1 account.

  3. Launch the Terminal app.

  4. Type "sudo dscl . delete /Users/oldname" where oldname is the user's previous uniqname. This removes their account from the local directory service.

  5. (if needed, CAUTION see notes below) Remove the home folder whose name matches the new uniqname by typing "sudo rm -R /Users/newname/" where newname is the user's new uniqname.

  6. Type "sudo mv /Users/oldname/ /Users/newname/"

  7. Type "sudo chown -R newname /Users/newname/"

  8. Type "sudo rm /Users/newname/.account"

  9. Restart the computer and have the user login.

Additional Notes

Step 5 (removing new name) is normally not needed because if the user has been unable to login with the new uniqname, it should not have created a home folder for that uniqname. It is possible that other trouble shooting steps have created this directory, and in that case it should be removed. Exercise caution by making sure that the folder you are removing does not contain the user’s data. All of their data should be located in the home folder with the old uniqname at this point.