Linux 开启sudo权限

# su -
输入root密码!
 # chmod u+w /etc/sudoers
 # visudo
在root ALL=(ALL) ALLZ下 添加xxx ALL=(ALL) ALL, 然后按esc键,再输入:wq!保存退出
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
xxxx(当前用户名)     ALL=(ALL)      ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
#chmod u-w /etc/sudoers


你可能感兴趣的:(linux)