Error when executing sudo: username is isn't in the sudoers file.
Assuming the user name is username, There are two scenarios
1,root user executes Visudo command, increments at end of configuration file
Username all= (All) all
2, or Visudo into the configuration file, there is a sentence:
# # Uncomment to allow members of the group sudo to execute any command #%sudoall= (all) all
This guy, said it was this option to allow Sudo group users to perform sudo after opening. Oh, yes.
First, delete the # number in front of the second sentence, then execute the following command to add the user to the Sudo group, finished
Usermod-a-G sudo username
Attached: If the sudo group is not reported, increase the sudo group first
Groupadd sudo
===========================
Although the first step is less ~ or feel the second method more comfortable ~ ~ ~
No other, open the configuration file to see a bunch of English, the brain began to play a variety of illusions ~
And if you add a second, three, four users, you do not have to open the configuration file, directly add users into the group can ~ ~
Attached, add user to Group command description:
http://blog.csdn.net/pursue168/article/details/6443046
Add sudo permissions