首页 > 代码库 > Error prompt:“xxx is not in the sudoers file”----Solution
Error prompt:“xxx is not in the sudoers file”----Solution
//Situation
System prompts "xxx is not in the sudoers file"(xxx equals the user name) while executing command "sudo":
sudo -i
Password:
xxx is not in the sudoers file. This incident will be reported.
//Analysis
The current account must have no rights to execute "sudo".
//Solution
To fix the problem, add the current account into the file "/etc/sudoers":
1. Switch to supervisor: su
2. Open the file "sudoers" with vi editor: vi /etc/sudoers
3. Add the account: press "i" to edit; find line "root ALL=(ALL) ALL"; new a line "xxx ALL=(ALL) ALL" below it; save&quit with the command "wq!".
//Problem solved.
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。