南强小屋 Design By 杰米
使用visudo命令进行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.
当前需要做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.
只需要将对应用户的行设置 NOPASSWD即可实现无密码sudo
标签:
Centos,配置sudo
南强小屋 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
南强小屋 Design By 杰米
暂无Centos配置sudo用户的评论...