9

How does the -u flag work with sudo?

view full story
linux-howto

http://www.linuxquestions.org – What does the syntax need to be in /etc/sudoers, to allow a sudo command to be run as another user? From the below output, I can sudo run it, only if I don't specify a user (which will run it as root). Code: [badm@beta fileManager]$  sudo -ubeta4 /bin/ls -l /var/named/ Sorry, user badm is not allowed to execute '/bin/ls -l /var/named/' as beta4 on beta.com. [badm@beta fileManager]$  sudo  /bin/ls -l /var/named/ total 12 -rw-r--r-- 1 named named 458 Dec  7 14:34 test2.com.db -rw-r--r-- 1 named named 458 Dec  8 11:03 test3.com.db -rw-r--r-- 1 named named 450 Dec&nbs (HowTos)