Bugzilla – Bug 49
Sudo Runas_Alias not picking up the correct user on commands
Last modified: 2001-12-17 15:02:42 MST
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.
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"
Turned out to be user error/misunderstanding.