Linux command – sudo

root@r1 [/var/log]# sudo -u nobody sh -c "whoami"
nobody

root@r1 [/var/log]# sudo -u nobody sh -c "tail yum.log"
Sep 30 01:17:38 Updated: net-snmp-libs 5.0.9-2.30E.19.i386
Sep 30 01:17:38 Updated: net-snmp-devel 5.0.9-2.30E.19.i386

root@r1 [/var/log]# man sudo
sudo allows a permitted user to execute a command as the 
superuser or another user, as specified in the sudoers file....

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *