某某用戶 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