Debian普通用户添加sudo权限
生活随笔
收集整理的這篇文章主要介紹了
Debian普通用户添加sudo权限
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
FROM: http://chenpeng.info/html/964
1、安裝sudo
# apt-get install sudo
2、修改 /etc/sudoers 文件屬性為可寫
# chmod +w /etc/sudoers
3、編輯 /etc/sudoers ,添加如下行
# vim /etc/sudoers
root ALL=(ALL) ALL
user ALL=(ALL) ALL 用戶user執行sudo時需要密碼。
#user ALL=NOPASSWD:ALL 用戶user執行sudo時不需要密碼。
#user ALL=NOPASSWD:/etc/network/interfaces 用戶user執行只有sudo執行/etc/network/interfaces的權限,執行時不需要密碼。
4、修改/etc/sudoers 文件屬性為只讀
# chmod -w /etc/sudoers
5、使用user登錄系統,執行以下命令啟動 /etc/network/interfaces
$ sudo /etc/network/interfaces restart
總結
以上是生活随笔為你收集整理的Debian普通用户添加sudo权限的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 64 bit Ubuntu suppor
- 下一篇: gearman简介及安装使用