mac系統忘記root密碼的解決辦法


由於長久不用Air了,所以忘記了之前的root密碼,導致很多命令都無法執行,於是找到了這個解決方法(經本人在Mac os x 10.6.8下測試成功!),故來跟大家分享下。

開機,並迅速按住 Command + S組合鍵,進入命令行模式
輸入命令(有時可能要命令路徑不同,可參考屏幕上顯示的那兩行提示),檢查系統錯誤並修復
[plain] view plaincopy
/sbin/fsck -fy

輸入命令,使有權限更改系統配置
[html] view plaincopy
/sbin/mount -uw /
最后根據命令
[html] view plaincopy
passwd root
來更改密碼就ok啦!
然后 敲入 reboot 命令,重啟機器就完工啦!


以下是原文:
Change an Admin Password in Mac OS X Single User Mode
This is a multistep process but it’s easy to follow:

First you need to enter Single User Mode. Reboot the Mac and hold down Command+S at boot to enter into the command line.
You’ll see a note where Mac OS X tells you that you need to run two commands in order to make filesystem changes, this is necessary so let’s handle that first
The first command checks the Mac OS X filesystem for errors and fixes them, it can take a few minutes to run:
fsck -fy

The next command mounts the root Mac OS X drive as writable, allowing you to make changes to the filesystem:
mount -uw /

After the filesystem is mounted, you can reset any users password using the following command:
passwd username

You’ll need to enter the new password twice to reset and confirm the changes


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM