I accidentally renamed my administrator's account and now I cannot unlock system preferences. How can I fix this situation?

I saw this after my actions: "The administrator account needs to be a different account than the one you're renaming. If necessary, create another administrator account, then remove it when you're done."

User uploaded file

I cannot unlock system preferences using previous User Name or renamed one. How can I fix this situation?

MacBook Pro with Retina display, macOS High Sierra (10.13.1)

Posted on Jul 3, 2018 8:07 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 3, 2018 10:31 AM

if you have tried old name and new name.

correct process is Change the name of your macOS user account and home folder - Apple Support


if you are not able to unlock follow below for a completely new account.. make the correct changes to your primary account..test it, then remove the new one you made


You can create a new administrator account by restarting the Setup Assistant:

  1. Boot into Single User Mode: Start/restart your Mac. As soon as you hear the startup tone, press and hold + S until you see a black screen with white lettering. (If you end up back on the login screen after a flash of the black screen with white lettering, enter your password and it will return to the black screen.)
  2. Check and repair the drive by typing
    /sbin/fsck -fy
    then ↩ enter - as directed by the on-screen text.
  3. Mount the drive as read-write by typing
    /sbin/mount -uw /
    then ↩ enter.
  4. Remove the Apple Setup Done file by typing
    rm /var/db/.AppleSetupDone
    then ↩ enter.
  5. Reboot by typing
    reboot
    then ↩ enter.
  6. Complete the setup process, creating a new admin account.
2 replies
Question marked as Top-ranking reply

Jul 3, 2018 10:31 AM in response to nikkitikitavi

if you have tried old name and new name.

correct process is Change the name of your macOS user account and home folder - Apple Support


if you are not able to unlock follow below for a completely new account.. make the correct changes to your primary account..test it, then remove the new one you made


You can create a new administrator account by restarting the Setup Assistant:

  1. Boot into Single User Mode: Start/restart your Mac. As soon as you hear the startup tone, press and hold + S until you see a black screen with white lettering. (If you end up back on the login screen after a flash of the black screen with white lettering, enter your password and it will return to the black screen.)
  2. Check and repair the drive by typing
    /sbin/fsck -fy
    then ↩ enter - as directed by the on-screen text.
  3. Mount the drive as read-write by typing
    /sbin/mount -uw /
    then ↩ enter.
  4. Remove the Apple Setup Done file by typing
    rm /var/db/.AppleSetupDone
    then ↩ enter.
  5. Reboot by typing
    reboot
    then ↩ enter.
  6. Complete the setup process, creating a new admin account.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I accidentally renamed my administrator's account and now I cannot unlock system preferences. How can I fix this situation?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.