The permission to modify the blog about everywhere, but this article is mainly for configuration files modified after ordinary users still can not create a file operation performed.
Modify the permissions, primarily to modify / etc / sudoers below
1. to root
command:
his
2. Add the write permission to root sudoers file
command:
chmod 777 /etc/sudoers
3. Edit the sudoers file
command:
vi /etc/sudoers
Find the line
root ALL=(ALL) ALL
In the following add
username ALL=(ALL) ALL
May be added to any of the following four formats
youuser ALL=(ALL) ALL
%youuser ALL=(ALL) ALL
youuser ALL=(ALL) NOPASSWD: ALL
%youuser ALL=(ALL) NOPASSWD: ALL
The first line: allows the user to execute youuser sudo command (password required).
The second line: allows the user to perform user group youuser inside sudo command (password required).
Third row: youuser allows users to run sudo command, and do not enter the password in the course of implementation.
Fourth row: which allows the user to group youuser sudo command performed by the user, and do not enter a password at the time of execution.
Exit the command:
ESC +:wq
4. Undo sudoers file permissions
command:
chmod u-w /etc/sudoers
After modifying, if you encounter the following problems
Blog source address :( I had with this configuration did not come out, estimated to be their configuration problem. So I found a second method)
https://blog.csdn.net/qq_38333529/article/details/79608224
Linux: sudo, no valid sudoers resources.
The source of this blog address is:
https://blog.csdn.net/llh_1178/article/details/58606179