Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to set the permissions of / etc/sudoers file in centos

Shulou Source: shulou.com Published: 2022-06-01 17:39:19 11月14日 Update

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!

Tags: Users articles files permissions no host that is value interest at the same time commands passwords meaning time-changing more friends knowledge editing industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Tech Info macOS OPPO Reno MariaDB