Macbook Pro 密码设置

需要将机器借给同事做测试,所以想吧密码设成空密码。在设置空密码过程中,没有细看系统提示(抽时间我会在去试一遍),直接回车修改完成。

杯具发生了,重新登录系统的时候,空密码不生效;更惨的是,旧的密码系统也不认了!


由于机器很新,没有系统备份,也没有系统盘。于是就有了以下的恢复过程。


1. 修改SUDOERS. 参考: http://www.macobserver.com/tip/2003/06/16.1.shtml

  1. Reboot the machine into single user mode (CMD+S on boot)
  2. Mount the root file system as read/write (mount -uw /)
  3. Edit the SUDOERS file (visudo)
  4. Change all occurences of "(ALL) ALL" to "NOPASSWD: ALL" (Note: You'll need to know your way around the text editor vi -- check out the vi tutorial in MacOS X Command Line 101 for more. -TMO)
  5. Save the SUDOERS file and reboot (ESC-w, ESC-q, 'reboot')
  6. Open a terminal and execute the command 'sudo passwd root' ----注意,这一步不工作,会有 “passwd the daemon encountered an error”错误提示。
2. 修改系统密码. 参考:  http://forums.macrumors.com/showthread.php?t=1191262

Step 1:Boot your mac with Option + R holding it will boot into recovery mode

Step 2: go into disk util and take terminal

Step 3: write resetpassword


好了。新的用户密码修改成功。



你可能感兴趣的:(Mac,OSX)