1751695 Members
5054 Online
108781 Solutions
New Discussion юеВ

Re: Sudoers file

 
ofure
Occasional Advisor

Re: Sudoers file

The challenge I have now is that I want the users in WAS to be able to switch to the account wasdevadmin without prompting for password.
I have tried this below but did not work.

WAS ALL=(wasdevadmin) NOPASSWD: ALL

Regards,
Matti_Kurkela
Honored Contributor

Re: Sudoers file

> WAS ALL=(wasdevadmin) NOPASSWD: ALL

When you use this sudoers line, your user *must* use "sudo -u wasdevadmin -i" or similar sudo command to become wasdevadmin. The "-H" option is optional, but probably in line with the user's expectations.

With this sudoers line, a command like "sudo su wasdevadmin" or "sudo su - wasdevadmin" will *not* work. This is because these commands first use sudo to become root, then use su to become the target user. Sudo can do it in one step - but it requires that the user uses the correct syntax.

MK
MK
ofure
Occasional Advisor

Re: Sudoers file

Hi All,

When I type this:
sudo -u wasdevadmin -i
it works without prompting me for password but it is a long command. I want to be able to type
su - wasdevadmin and for it to call up
sudo -u wasdevadmin -i

Presently, I have this configuration:

#cd /bin
# ls -l su*
root root 45 Feb 16 17:17 su
root root 28336 Oct 30 2008 su.original

# cat su
sudo su.original $@

So presently when I type su -, it call up sudo su.original, which works fine for my switching to root access.
How can I also have:
"sudo -u wasdevadmin -i" equal to "su - wasdevadmin"

Thanks.

ofure
Occasional Advisor

Re: Sudoers file

I have resolved this by creating an alias for wasdevadmin.

Thanks all.