Centos配置sudo用户

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

## service management apps and more.

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

相关文章

今天小编给大家分享一下excel图案样式如何设置的相关知识点,...
这篇文章主要讲解了“win10设置过的壁纸如何删除”,文中的讲...
这篇“Xmanager怎么显示远程linux程序的图像”文章的知识点大...
今天小编给大家分享一下xmanager怎么连接linux的相关知识点,...
这篇“如何重置Linux云服务器的远程密码”文章的知识点大部分...
本篇内容介绍了“Linux云服务器手动配置DNS的方法是什么”的...