


Centos配置sudo用戶
添加時間:2019-6-14 19:00:00
添加:
思海網(wǎng)絡(luò)
使用visudo命令進(jìn)行sudo配置文件的編寫
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
ansible ALL=(ALL) ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
當(dāng)前需要做sudo的用戶為ansible,即將其添入root行下方
保存退出即可
免密碼sudo
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
ansible ALL=(ALL) NOPASSWD:ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
只需要將對應(yīng)用戶的行設(shè)置 NOPASSWD即可實現(xiàn)無密碼sudo
關(guān)鍵字:Centos、sudo、用戶
新文章:
- CentOS7下圖形配置網(wǎng)絡(luò)的方法
- CentOS 7如何添加刪除用戶
- 如何解決centos7雙系統(tǒng)后丟失windows啟動項
- CentOS單網(wǎng)卡如何批量添加不同IP段
- CentOS下iconv命令的介紹
- Centos7 SSH密鑰登陸及密碼密鑰雙重驗證詳解
- CentOS 7.1添加刪除用戶的方法
- CentOS查找/掃描局域網(wǎng)打印機IP講解
- CentOS7使用hostapd實現(xiàn)無AP模式的詳解
- su命令不能切換root的解決方法
- 解決VMware下CentOS7網(wǎng)絡(luò)重啟出錯
- 解決Centos7雙系統(tǒng)后丟失windows啟動項
- CentOS下如何避免文件覆蓋
- CentOS7和CentOS6系統(tǒng)有什么不同呢
- Centos 6.6默認(rèn)iptable規(guī)則詳解