linux下为用户配置免密码sudo权限
1.切换到root账号
su - root
2.在配置文件/etc/sudoers中添加
usrName ALL=(ALL) NOPASSWD: ALL
3.验证
[b@b3 ~]$ cat /etc/sudoers
cat: /etc/sudoers: Permission denied
[b@b3 ~]$ sudo cat /etc/sudoers
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##