Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

sudoer sudo no password NOPASSWORD

#RECOMMENDED
cp /etc/sudoers /root/sudoers.bak
visudo
leonard ALL = NOPASSWD: /bin/systemctl restart httpd.service, /bin/kill

#NOT RECOMMENDED
cp /etc/sudoers /root/sudoers.bak
visudo
leonard ALL=(ALL) NOPASSWD:ALL

#TEST
sudo ls -ls /root
Source by www.cyberciti.biz #
 
PREVIOUS NEXT
Tagged: #sudoer #sudo #password #NOPASSWORD
ADD COMMENT
Topic
Name
6+3 =