Issue with sudoers file.

Hi All,

I am new to sudoers file. I am asked to troubleshoot why a particular user (alandhi) is not able to run a script as a different user(scmtg). I have the following line in my sudoers file and the user's name added to the group.

User_Alias QA_USERS = alandhi, testuser1, qauser3

QA_USERS blacksheep1 = \
   (scmtg) /opt/cms_scripts/startCleanPP_weekly.sh ,\
   (scmtg) /opt/cms_scripts/startCleanPP_quartely.sh

Can anybody help me in sorting out why the user is still not able to run the above scripts by using sudo in sun solaris machine as below.

$id
uid=210764(alandhi) gid=100(users) groups=100(users),2008(ops)
$sudo -u gtscm /opt/cms_scripts/startCleanPP_weekly.sh
password:
Error: alandhi is not in the sudoers file.  This incident will be reported. 

p.s It would be also great if any one can give me an online tutorial which explains how to play around with the sudoers file like above.

Probably because you're trying to run the script as user "gtscm", while sudo is configured to allow running the script as "scmtg". To avoid getting such error messages, run sudo -l first, as it will list all allowed commands for a user.

im sorry that was a typo...

scmtg is the correct one...

$id uid=210764(alandhi) gid=100(users) groups=100(users),2008(ops) 
$sudo -u scmtg /opt/cms_scripts/startCleanPP_weekly.sh password: 
Error: alandhi is not in the sudoers file.  This incident will be reported.
$/usr/local/bin/sudo -l
Sorry, user alandhi may not run sudo on blacksheep1.

Is what you posted the complete content of your sudoers file? If not, how did you edit the file (visudo or directly)? Could you grep the sudoers file for any other entries for this user?