Using sudo, you can temporarily gain root privileges when you log on as a non-root user and execute the required commands. Users who can use sudo can be called sudoer.
Add Sudoer method (assuming you have sudo installed): Execute
# Visudo
Or
# Sudoedit
Tips:
Some distributions of sudo provide sudoedit, while others provide Visudo, essentially the same as the functionality. You can also use other editors such as VI to edit/etc/sudoers, but since the file is read-only, force the save (such as w!) or remove the read-only attribute and save it. Find
Root all= (All) all
Add the following
User name all= (all) all
Or
User name all= (all) Nopasswd:all <<-----OK is this thing always forget, write to you today
===========================================================
%adm all= (All) all
If Sudo does not want to enter the password, you can change the sentence to:
%adm all= (All) Nopasswd:all
____________________________________
| Save the file, and then execute |
| |--I've never done this in this box, or I can.
| #gpasswd-A user name ADM |
———————————————
The user can then use sudo.
Linux User Add Sudoer