设置用户666在不输入该用户的密码的情况下使用所有命令:
grep 666 /etc/sudoers 666 ALL=(ALL) NOPASSWD:ALL#666 ALL=(ALL) ALL #sudo su - 时是需要输入666用户的密码,才能切换成root权限!!!!
$ who am i 666 pts/0 2017-04-26 11:15 -bash-4.1$ sudo su - [[email protected]86 ~]# #免密码切到root权限 # who am i 666 pts/0 2017-04-26 11:15
允许root用户在任何路径下,使用任何命令:
grep root /etc/sudoers ## the root user, without needing the root password. ## Allow root to run any commands anywhere root ALL=(ALL) ALL
时间: 2024-10-25 15:41:21