跳转到主内容

How to reset the password on a Mac

  1. How to reset the password on a Mac, Start your Mac in Single-User Mode: 步骤 1 中的图像 1,1
    • Shut down your Mac

    • Press and hold the Command + S keys while pressing the power button to turn on your Mac.

    • It is best to start holding the keys before the screen turns on or you hear the startup chime. If you see the Apple logo, then you need to shut down and to do this step over. Except on a Mac with a T2 chip, the Apple logo will always appear the second the computer turns on.

    • You should see a black screen with white text.

  2. How to reset the password on a Mac, Mount root device as read-write: 步骤 2 中的图像 1,1
    • When the text stops, you should see a line that says "localhost:/ root#" at the bottom. If you don't see "localhost:/ root#", press enter.

    • Type in "mount -uw"

    • Some more text will appear on the screen. when you see the "localhost:/ root#"at the bottom, continue to the next step

  3. How to reset the password on a Mac, Remove the .AppleSetupDone file: 步骤 3 中的图像 1,1
    • Type in, "rm /var/db/.AppleSetupDone" and press enter/ return

    • This is case sensitive!

    • There must be a space in between the rm and / otherwise you will get a "no such file or directory" error

    • This method WILL NOT work if FileVault is enabled on the startup disk.

  4. How to reset the password on a Mac, Override root/wheel for /var/db/.AppleSetupDone: 步骤 4 中的图像 1,1
    • If you get a message that says "override r------- root/wheel for /var/db/.AppleSetupDone?", type in "y" and press enter/return.

    • You may get an error that says, "rm: /var/db/.AppleSetupDone: read-only file system.

    • If you don't see a message that says "override r------- root/wheel for /var/db/.AppleSetupDone?", then continue to the next step.

  5. How to reset the password on a Mac, Reboot computer: 步骤 5 中的图像 1,1
    • Type in "reboot" and press enter/return.

  6. How to reset the password on a Mac, Setup your Mac: 步骤 6 中的图像 1,2 How to reset the password on a Mac, Setup your Mac: 步骤 6 中的图像 2,2
    • Your Mac will now reboot to the Setup Assistant. you can now set up your Mac.

  7. How to reset the password on a Mac, Congratulations: 步骤 7 中的图像 1,2 How to reset the password on a Mac, Congratulations: 步骤 7 中的图像 2,2
    • You have now created a new user account with full administrator access. And all the user accounts created prior to this remain untouched

结论

You have now successfully created a new administrator account on your Mac.

18等其他人完成本指南。

Elijah

于12/16/18注册

1,130 声望

创作了2篇指南

5条评论

What are the steps to overcome the error?

“You may get an error that says, rm: /var/db/.AppleSetupDone: read-only file system.”

dhinostroza - 回复

This error can be caused because FileVault is enabled or that there was some random error. Try running the same commands in Terminal in the macOS recovery partition and see if that works. This error may also occur on a Mac with a T2 chip. If FileVault is enabled, you will have to erase the hard drive/SSD and reinstall macOS if you forgot your password.

Elijah -

i get no such file or directory why ???

Mohamed Barnoussi - 回复

El nuevo usuario administrador que se crea ¿de dónde toma el nombre “Admin” que es el nombre del nuevo usuario administrador?

Horacio Gáñez

Harok Hga - 回复

: /var/db/.AppleSetupDone: read-only file system.",

you have to allow write access to the filesystem,

but only after checking for errors.

On my old MacBookPro, it's written in the system messages:

/sbin/fsck -fy

/sbin/mount -uw /

rm /var/db/.AppleSetupDone

Afterwards, it worked as described

Walter Bastanier - 回复

添加评论

浏览统计数据:

过去 24 小时: 44

过去 7 天: 192

过去 30 天: 842

总计 34,260