How to join a user group sodu

Before a command with sudo, you can use the superuser privileges to execute the command. But not any user can use sudo, you can use this command only if the user belongs to the sudo group.

If you want to join a user group sudo, you can then execute visudo as root login system (in fact, this command is to use vi to edit / etc / sudoers file, / etc / sudoers file itself is read-only). Found in the file "root ALL = (ALL) ALL" this line, and then adding the following line "user ALL = (ALL) ALL", so put the user sudo user to join the group.

With user login, and then execute a command with sudo, such as sudo visudo :), the system prompts for a password, then need to enter the user's password instead of the root password. If you do not want to enter a password, you can modify this in the implementation visudo "user ALL = (ALL) NOPASSWD: ALL".

Forwarding  https://www.linuxidc.com/Linux/2012-06/61951.htm

Guess you like

Origin www.cnblogs.com/logol/p/12069522.html