[sudo-users] syntax error

LaComa, Lyn Lyn.LaComa at inova.org
Wed Jul 20 14:12:58 EDT 2011


Recently installed sudo 1.8.1p2 on AIX 6.1.0.0.

Is working for original purpose of security user adding other users,
with specific commands specified in sudoers.

 

Problem with a runas_alias for a specific user (lawson)  to run a script
to start an application. 

Root can run the script with no problem, of course.

 

Part of  sudoers:

# Run as alias specification

Runas_Alias  LAW = root

 

lawson ALL = (LAW) NOPASSWD: /prod/scripts/lawstart.sh

lawson ALL = (LAW) NOPASSWD: /prod/scripts/lawstop.sh

 

beginning of script setting up variables: 

$ more lawstop.sh

## Sample Shut Down Script with Correct Order ##

PATH=/opt/IBM/ldap/V6.2/sbin:/opt/IBM/ldap/V6.2/bin:$PATH

 

# Kill WebSphere DataStage RMI Server process

PID=$( ps -ef | grep -v grep| grep rmiserver | awk '{print $2}')

COMPID=$( ps -ef | grep -v grep | grep comsvr | awk '{print $2}')

SMTPPID=$( ps -ef | grep -v grep | grep SmtpAgent | awk '{print $2}')

 

 

Results when trying to execute via sudo:

$ sudo -D 9 ./lawstop.sh

sudo: settings: debug_level=9

sudo: settings: progname=sudo

sudo: settings: network_addrs=10.160.32.60/255.255.255.0

sudo: sudo_mode 1

sudo: policy plugin returns 1

sudo: command info: umask=022

sudo: command info: command=/prod/scripts/lawstop.sh

sudo: command info: runas_uid=0

sudo: command info: runas_gid=0

sudo: command info: runas_groups=0,2,3,7,8,10,11,206,207,208

sudo: command info: closefrom=3

sudo: command info: set_utmp=true

/prod/scripts/lawstop.sh: Syntax error at line 5: `PID=$' not expected.

sudo: received signal 20

sudo: calling policy close with wait status

 

 

any ideas?

 




More information about the sudo-users mailing list