linux-sudo permissions (operating system commands)

1: sudo permissions:

root grants ordinary users to execute commands that could only be executed by super users

sudo operates on system commands

2: Use sudo

visudo actually modified the / etc / sudoers file

root          ALL=                        (ALL)                           ALL

User name Managed host address = (available identity) is not the source IP address Authorization command (absolute path)

It means that yanglinux can only execute the / sbin / shutdown -r now command, other parameter options are not available.

 

% Indicates the group name The address of the managed host = (available identity) Authorization management (absolute path)     

3: Ordinary users execute commands given by sudo

su-common username

sudo -l view available sudo commands

sudo absolute path

sudo / sbin / shutdown -r now (Ordinary users execute commands given by sudo)

Then prompt to enter the common user password:

                              

Published 148 original articles · Like 10 · Visitors 20,000+

Guess you like

Origin blog.csdn.net/ab1605014317/article/details/105305934