help with sudo

Matthew Hannigan mlh at
Tue Aug 13 20:15:47 EDT 2002

On Tue, Aug 13, 2002 at 10:07:36AM -0700, Duc T Le wrote:
> I'm trying to run sudo as oracle user and I'd like to shut down process 
> owned by another user call tuxedo. Here is my command:
> /usr/local/bin/sudo -u tuxedo sh -c "/apps1/tuxedo/bin/tmshutdown -y"
> After this command is executed, system reply with message Killed, but the 
> process is not down as expected. In my sudoers, the oracle user has 
> authorised to run as tuxedo without password.
> Did I miss out something in my command ?

What you have done looks ok.
Check  the tmshutdown script itself.

Some times these scripts are badly written
in that they will kill any process matching a certain string.
In which case they will kill the parent before
it has a chance to do something useful.
The "Killed" message certainly sounds like this.

What does the command output if you run
directly from user oracle (not through sudo?)

What you might do to fix this is run the command
without the "sh -c"  -- that shouldn't be necessary anyway.

In other words:
	sudo -u tuxedo /apps1/tuxedo/bin/tmshutdown -y


More information about the sudo-users mailing list