MAC中ROOT用户很少用到,有时又手贱,给设了密码,过一阵忘了密码,很尴尬??
分享个小技巧:
在MAC开机读条之前按住“ command + S ”,会进入字符界面,按照提示,依次输入下面3条命令:
1. /sbin/fsck -fy #回车后等待出现“#”提示符
2. /sbin/mount -uw / #回车后继续等待出现“#”提示符
3. launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist #回车
现在就可以直接输入 passwd root 更改 root 账户的密码了.
原文:https://www.cnblogs.com/qiyunshe-NSD1805/p/9575159.html