Linux学习笔记 --- xxx is not in the sudoers file

在Centos下没使用root用户的时候,操作root用户权限可操作的文件的时候。需要使用sudo命令,

但是当你使用的时候sudo mv, cp等命令的时候会报错,出现以下提示信息

解决方案是切换到root用户,输入

visudo

等价于

vi /etc/sudoers

找到root ALL=(ALL) ALL,在下面添加一行

xxx ALL=(ALL) ALL 其中xxx是你要加入的用户名称

猜你喜欢

转载自blog.csdn.net/qq_33472663/article/details/106303726
今日推荐