sudo普通用户使用root权限执行命令

修改/etc/sudoers

里面有一行

## Allow root to run any commands anywhere 
root    ALL=(ALL)       ALL

用cat /etc/sudoers命令查看,大概在倒数十几行。在下面将你的普通用户加上去就行了

xxxx ALL=(ALL)       ALL

猜你喜欢

转载自blog.csdn.net/qq_32736999/article/details/82467693