历史,打开尘封的记忆
新博客地址:https://getstarted.readthedocs.io

导航

 

1、Debian默认没有sudo功能,因此需要自己安装:# apt-get install sudo
2、# chmod +w /etc/sudoers
3、# vim /etc/sudoers,添加如下行

root     ALL=(ALL:ALL) ALL
toney    ALL=(ALL:ALL) ALL                        # 用户user执行sudo时需要密码。
#toney   ALL=NOPASSWD:ALL                         # 用户user执行sudo时不需要密码。
#toney   ALL=NOPASSWD:/etc/network/interfaces     # 用户user执行只有sudo执行/etc/network/interfaces的权限,执行时不需要密码。

4、# chmod -w /etc/sudoers

posted on 2019-03-23 17:48  AR0X1V  阅读(1419)  评论(0编辑  收藏  举报