新网创想网站建设,新征程启航

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

Centos怎么配置sudo用户

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

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

10年积累的成都网站建设、做网站经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先制作网站后付款的网站建设流程,更有辽宁免费网站建设让你可以放心的选择与我们合作。

使用visudo命令进行sudo配置文件的编写

## The COMMANDS section may have other options added to it.#### Allow root to run any commands anywhereroot    ALL=(ALL)       ALLansible 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 anywhereroot    ALL=(ALL)       ALLansible ALL=(ALL)       NOPASSWD:ALL## Allows members of the 'sys' group to run networking, software,## service management apps and more.

只需要将对应用户的行设置 NOPASSWD即可实现无密码sudo


网页标题:Centos怎么配置sudo用户
转载源于:http://www.wjwzjz.com/article/eigoeo.html
在线咨询
服务热线
服务热线:028-86922220
TOP