重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

Centos怎么配置sudo用户

本篇内容介绍了“Centos怎么配置sudo用户”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

创新互联是专业的云浮网站建设公司,云浮接单;提供成都做网站、网站建设、外贸营销网站建设,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行云浮网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!

使用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用户”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联网站,小编将为大家输出更多高质量的实用文章!


网页名称:Centos怎么配置sudo用户
标题路径:http://cqcxhl.com/article/jhojjo.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP