Quantcast
Channel: 钻戒 and 仁豆米
Viewing all articles
Browse latest Browse all 290

MacBook Air忘记root密码

$
0
0

本来想喜大普奔一下,在Dell的桌面机上装个macox,末了居然要编译smc_read.c,下载下来,发现没有GCC,没办法,得用root去装一个,苦逼了,忘记密码了。

没办法,搜了半天,合着网上大部分答案都是不对的,记录一下过程,下次备用:

①如果系统是双系统,按住option键冷起,会提示启动mac还是windows,这时候按住command+s,再选择macos,进入单用户维护模式,是一个滚动的黑色白底的文件界面。

②系统会提示,/sbin/fsck -fy,这个步骤会在我这里重复好几次,直到提示: The volume Macintosh HD appears to be ok.为止

③接下来,/sbin/mount -uw /,把根分区mount成读写模式

④passwd root

⑤如果passwd的时候提示错误,说什么daemon有问题: 运行:

launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist  

然后再运行passwd root即可

注意:输入的密码不会显示,输入两遍即可。 Over!!!

补充:不要试图去编译smc_read.c,必须装gcc和xcode才可以,这个属于复杂了,不推荐!!!!!!


Viewing all articles
Browse latest Browse all 290

Trending Articles