macOS xxx is not in the sudoers file.

网友投稿 695 2022-09-20

macOS xxx is not in the sudoers file.

macOS   xxx is not in the sudoers file.

遇到的问题 macOS   xxx is not in the sudoers file.

无法使用sudo了,当前用户还是admin权限

ls -l /etc/sudoers

-r--r-----  1 root  wheel  1563 Jul  9 16:47 /etc/sudoers

此时 sudo chmod 640 /etc/sudoers , 是不能用的,此时可以用finder 找到对应文件,加权限,临时都可以读写

此时可以  vim /etc/sudoer

root            ALL = (ALL) ALL%admin          ALL = (ALL) ALL

%wheel ALL=(ALL:ALL) ALLdh ALL=(ALL:ALL) NOPASSWD: ALL

保存退出

chmod 600 /etc/sudoer

再次使用sudo 正常了

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:跟哥一起学Python(1) - python简介(python教程)
下一篇:UNIX编程艺术学习笔记-1
相关文章

 发表评论

暂时没有评论,来抢沙发吧~