How to set the permissions of / etc/sudoers file in centos
This article mainly introduces how to set the permissions of the/etc/sudoers file in centos. It has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.
We see this setting in the/etc/sudoers file:
## Allows people in group wheel to run all commands # %wheel ALL=(ALL) ALL ## Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL
What does NOPASSWD: ALL mean? Take a look below:
*#FULLTIMERS can run any command on any host without entering your own password FULLTIMERS ALL = NOPASSWD: ALL*
Very good, that is to say, users who are set to NOPASSWD: ALL can become root users with only sudo, very good!
We can set a user as:
somealreadyexistuser ALL=(ALL) NOPASSWD: ALL
Then somealreadyexistuser can become root at any time!
Thank you for reading this article carefully. I hope that Xiaobian's shared article "How to set the permissions of/etc/sudoers file in centos" will help everyone. At the same time, I hope everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!