Bug 49

Summary: Sudo Runas_Alias not picking up the correct user on commands
Product: Sudo Reporter: James Vastine <James.Vastine>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: normal    
Version: 1.6.3   
Hardware: Sun   
OS: Solaris 2.x   

Description James Vastine 2001-08-29 16:25:52 MDT
Using sudo v1.6.3p7 on Solaris 2.6 Kernel patch 105181-23
NIS installed on this machine.

Trying to get user "username" to execute a command as user "oracle"
below are relevant lines from my sudoers file.

##
# User alias specification

Runas_Alias     DB = oracle

# User privelage specification

username          ALL = (DB) NOPASSWD: ALL

basically I have a script and I want to be able to restart Oracle's listener
as Oracle when it dies,  in testing this I touched a file and it creates it
fine with nopasswd but it leaves the file permissions as root:other.

Any help you could provided would be appreciated,
thanks in advance.
Comment 1 Todd C. Miller 2001-12-15 11:10:59 MST
How did you run sudo, did you specify the -u flag?  When running a command as a user other than root
you must specify the target user.  E.g. "sudo -u oracle touch foo"
Comment 2 Todd C. Miller 2001-12-17 11:02:59 MST
Turned out to be user error/misunderstanding.