is not in the sudoers file. This incident will be reported(linux 用户没有sudo权限)
linux 用户没有sudo权限1. 切换root用户su root2. 给/etc/sudoers添加写的权限chmod u+w /etc/sudoers3.添加用户添加sudo权限a. vi/etc/sudoersb. 在root ALL=(ALL) ALL这句下面添加h...
·
linux 用户没有sudo权限
1. 切换root用户
su root
2. 给/etc/sudoers添加写的权限
chmod u+w /etc/sudoers
3.添加用户添加sudo权限
a. vi /etc/sudoers
b. 在root ALL=(ALL) ALL这句下面添加hunter ALL=(ALL) ALL。如下图所示
3. 去掉/etc/sudoers的写权限。
chmod u-w /etc/sudoers
更多推荐
已为社区贡献1条内容
所有评论(0)