linux
1.增加user
/usr/sbin/useradd hjuser
password hjuser 为hjuser设置密码
*****
2.以这个user登录,sudo su的时候报错
“hjuser is not in the sudoers file. This incident will be reported.”
解决方法:
超级用户下
1)打开/etc/sudoers文件:$vi /etc/sudoers
2)找到这一 行:"root ALL=(ALL) ALL"在起下面添加"xxx ALL=(ALL) ALL"(这里的xxx是你的用户名),“wq!”保存并退出。
"hjuser ALL=(ALL) ALL"
3.grep
grep 'ALL=' /etc/sudoers
在/etc/sudoers中搜索包含“ALL=”的字符