XXX is not in the sudoers file. This incident will be reported. You have new mail in /var/mail/XXX
首先需要重启您的电脑,重启的时候在键盘上面按住Command+S,进入单用户模式。进入单用户模式后,会出现滚动文本代码的页面。您需要先等待一分钟左右,等待文本滚动停止。
mount -uw /
rm /var/db/.AppleSetupDone
reboot
当输入 reboot 命令回车后,Mac会重新启动,然后显示设置助理的页面,就像激活电脑的时候一样。需要在这个界面里面重新创建一个新的管理员,创建的时候,用户名必须和电脑里面已有用户名称不同。
Is the account you are using a member of the 'admin' group
id -a
look for '80(admin)' in the list of groups.
If not, then check System Preferences -> Users & Groups to see if 'Admin' is listed under the account username.
If your account is a member of the '80(admin)' group, then your /etc/sudoers file is corrupt.
需要用上一种方法创建一个管理员账户,进入以后,把这个出问题的账户改成管理员权限。然后再删除。
不要看官网回复的方案,非常傻! 官方是这样说: your /etc/sudoers file is corrupt. You will need to restore this from a backup, most likely from Recovery mode, as it is unlikely you have permissions to become root any longer.
非常绝望!非常坑! 实际上根本就不需要恢复到之前,也并不是没办法解决。这个官方的解决方案完全就是个坑die。
Comments