Giving ordinary users sudo permissions Debian10

In order to allow ordinary users only root has some commands that can be executed, but do not want to tell people the root password information, then you can use the sudo command, the root account login modify / etc / sudoers file.

1, add write permissions to the sudoers file: chmod u + w sudoers

2, edit sudoers file: vim sudoers

3, # the User Privilege Specification
root ALL = (ALL: ALL) ALL
debian10 ALL = (ALL: ALL) NOPASSWD: ALL
 //, debian10 user name, NOPASSWD explained without entering a password

4, the change back sudoers file: chmod u = r-- sudoers

Sudo quickly try it.

E.g:

debian10 @ debian10: ~ $ sudo ifconfig

original link: https: //blog.csdn.net/lovescorpio/article/details/103611353

Guess you like

Origin www.cnblogs.com/Ai-Hen-Jiao-zhi/p/12116376.html