Centos配置sudo用户
Centos配置sudo用户
发布时间:2016-12-27 来源:查字典编辑
摘要:使用visudo命令进行sudo配置文件的编写##TheCOMMANDSsectionmayhaveotheroptionsaddedtoi...

使用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

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新RedHat/Centos学习
热门RedHat/Centos学习
操作系统子分类