佚名 通过本文向大家介绍了centos sudoers,centos 7 sudoers,etc/sudoers,vi etc/sudoers,linux etc/sudoers等相关知识,希望对您有所帮助,也希望大家多多支持微课江湖
我们看到/etc/sudoers文件中有这种设定:
## Allows people in group wheel to run all commands # %wheel ALL=(ALL) ALL ## Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL
其中的 NOPASSWD: ALL 是什么意思呢?看一下下面:
*#FULLTIMERS可以运行任何命令在任何主机而不用输入自己的密码 FULLTIMERS ALL = NOPASSWD: ALL*
非常好,也就是说,设置为NOPASSWD: ALL的用户,可以只用sudo就变身为root用户,very good!
我们可以随便设置一个用户为:
somealreadyexistuser ALL=(ALL) NOPASSWD: ALL
那么这个somealreadyexistuser用户就可以随时变身为root用户了!
</div>