[sudo-users] Help on sudoers and Runas_Alias

Ahamed ahamed.en at gmail.com
Thu Jan 27 18:44:16 EST 2011

Hi All,

Thank you for your time. Request you to help with the sudoers issue I am

I am trying to make use of Runas_Alias feature of sudoers. Some how I am not
able to. Hope someone can help me. Thanks in advance.

I want the script /app2/run to be run as user "operator" when executed by
the user engg. The /app2/run is just a sample script with "id" command in it
for testing purpose. Anyways, here is the contents


$ cat run
echo "-----------------------------------------------"
echo "-----------------------------------------------"

In /etc/sudoers, I have the following entry


Runas_Alias OP=operator
engg         ALL =  (OP) NOPASSWD: /app2/run

I executed it using the -u option but no luck. I also tried giving the uid
instead of username.


$ sudo -u operator ./run
sudo: unable to execute /app2/run: Permission denied

Is there anything I am doing wrong?

Here is my unix box version


$ uname -a
Linux flx1208 2.6.21_mvlcge510-pc_target-x86_em64t-Malban10-cge5 #1
SMP PREEMPT RT Thu Nov 18 07:12:50 CST 2010 x86_64 GNU/Linux

Normal sudoers works, I mean if I have entry like


engg         ALL =  NOPASSWD: /app2/run

And on execution


$ sudo ./run
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),4(adm)


Thank You,

More information about the sudo-users mailing list