某某用户 is not in the sudoers file. This incident will be reported.”
(用户不在sudoers文件中……)web
如今要让某某用户得到sudo使用权
1.切换到超级用户root
$su root
2.查看/etc/sudoers权限,能够看到当前权限为440
$ ls -all /etc/sudoers
-r--r----- 1 root root 744 6月 8 10:29 /etc/sudoers
3.更改权限为777
$chmod 777 /etc/sudoers
4.编辑/etc/sudoers
$vi /etc/sudoers
5.在root ALL=(ALL:ALL) ALL 下面添加一行
jack ALL=(ALL)ALL
而后保存退出。
第一个ALL是指网络中的主机,咱们后面把它改为了主机名,它指明jack能够在此主机上执行后面的命令。
第二个括号里的ALL是指目标用户,也就是以谁的身份去执行命令。
最后一个ALL固然就是指命令名了。
具体这里不做说明
6.把/etc/sudoers权限改回440
$chmod 440 /etc/sudoers
网络
7.操做完成,切换到某某用户测试一下ide