passing flags to commands

Jim Chivas j_chivas at
Fri May 30 15:04:17 EDT 2003


I have the follwoing setup. I want to be able to run a command but I
want to restrict the options that can be passed to this command.

The format of the coomand I want the user to run is:

/usr/bin/chuser	account_locked=true [unx]*

I have setup suders file as follows:

User_Alias	SYSOP	=	sysop

Cmnd_Alias SYSOP_CMNDS1	= /usr/bin/chuser [account_locked=true]	[unx]*



1. what will the sudo user need to type to get this command to run
correctly. I have tried:

sudo chuser account_locked=true unx8300

But I then get asked for password which I don't want or shouldn't need.

2. I was hoping I could get the user to enter:

sudo chuser unx8300 and have the 'account_locked=true' part be generated
by sudo.

Is this possible or does the user have to enter the complete command as
entered in the sudoers file?

Any other suggestions?



-- ---------------------------------------------------------------------

Jim Chivas                              email:  jchivas at
Information And Computing services      fax:    (604) 323-5349
Langara College                         Voice:  (604) 323-5390
100 West 49th  Avenue         
Vancouver, B.C., Canada
V5Y 2Z6

More information about the sudo-users mailing list