linux install sudo

1, mounting the sudo
# APT-GET the install the sudo
2, modify / etc / sudoers file attribute to write
# the chmod + W / etc / sudoers
. 3, edit / etc / sudoers, add the following lines
# Vim / etc / sudoers
the root ALL = (ALL) ALL
user ALL = (ALL) ALL user password is required when the user execute sudo.
#user ALL = NOPASSWD: ALL users without a password when user execute sudo.
#user ALL = NOPASSWD: / etc / network / interfaces sudo user user perform only execute / etc / network / interfaces of authority, no password is required when performing.
4, edit / etc / sudoers file is read only
# chmod -w / etc / sudoers

Guess you like

Origin www.cnblogs.com/xiangxinhouse/p/11135911.html