CentOS解決系統(tǒng)提示“ jackluo is not in the sudoers file”
2016-09-02 07:48:14
11917
當(dāng)在終端執(zhí)行sudo命令時(shí),系統(tǒng)提示“ jackluo is not in the sudoers file”:
$ sudo ls
Password:
jackluo is not in the sudoers file. This incident will be reported.
1.切換到超級(jí)用戶:$ su
2.打開/etc/sudoers文件:$vi /etc/sudoers
3.修改文件內(nèi)容:
找到“root ALL=(ALL) ALL”一行,在下面插入新的一行,內(nèi)容是“cuser ALL=(ALL) ALL”,然后在vi鍵入命令“wq!”保存并退出。
注:這個(gè)文件是只讀的,不加“!”保存會(huì)失敗。
4.退出超級(jí)用戶:$ exit
5.可以盡情使用sudo了。
會(huì)員登錄
賬號(hào)登錄還沒(méi)有賬號(hào)?立即注冊(cè)