灵飞猫 發表於 2019-11-5 13:00:00

debian系统中添加sudo权限

<p>刚安装好的Debian默认还没有sudo功能。<br>1、安装sudo<br># apt-get install sudo<br>2、修改 /etc/sudoers 文件属性为可写<br># chmod +w /etc/sudoers<br>3、编辑 /etc/sudoers ,添加如下行<br># vim /etc/sudoers<br>root ALL=(ALL) ALL<br>user ALL=(ALL) ALL&nbsp; &nbsp;#用户user执行sudo时需要密码。user为自己的系统登陆名称<br>#user ALL=NOPASSWD:ALL&nbsp; #用户user执行sudo时不需要密码。<br>#user ALL=NOPASSWD:/etc/network/interfaces&nbsp; #用户user执行只有sudo执行/etc/network/interfaces的权限,执行时不需要密码。<br>4、修改/etc/sudoers 文件属性为只读<br># chmod -w /etc/sudoers</p>
<p>博客原文:https://www.cnblogs.com/wangkongming/p/3758759.html。如有侵权,请联系后删除。</p><br><br>
来源:https://www.cnblogs.com/xiangxinhouse/p/11797754.html
頁: [1]
查看完整版本: debian系统中添加sudo权限