Linux: Set sudo permissions for ordinary users

1. Modify the configuration file
The full English name of sudo is super user do, that is, to execute commands as a super user (root user). Whether the user has the execution authority of the sudo command depends on whether it is set in the /etc/sudoers file.

/etc/sudoers is a text file with specific syntax, don't use vim or vi to edit directly, but use visudo command. It should be noted that only the root user has the permission to execute this command.

Switch to the root user, enter visudo in the command line, and you can directly enter the edit page of /etc/sudoers.
insert image description here

2. Add configuration at the end

ffcs    ALL=(ALL)       NOPASSWD:ALL

In this way, the ffcs account can use sudo without entering a password.

3. Save and exit.

Guess you like

Origin blog.csdn.net/Brave_heart4pzj/article/details/130763955