cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Sudo configuration

 
Highlighted
Valued Contributor

Sudo configuration

Hi masters,

I needed to configure sudo in one of our server.
I have installed sudo.
I have created directory and copied commadns which are need to allow user to run.

Requested help in modifying sudoers file.

I tried to do this.

Host_Alias WEBSERVERS = node1

User_Alias ADMINS = raj

raj node1 = /usr/commands


Chandra
2 REPLIES 2
Honored Contributor

Re: Sudo configuration

>>I tried to do this.

And what happened when you did? What happened when you ran 'sudo somecommand' as the user 'raj'? Did you get an error?
Highlighted
Trusted Contributor

Re: Sudo configuration

for example, to allow raj to execute command /usr/commands as user www-data on node node1:

User_Alias ADMINS = raj
Runas_Alias WADM = www-data
Host_Alias WEBSERVERS = node1
Cmnd_Alias CMD = /usr/commands

ADMINS WEBSERVERS = (WADM) CMD

Then:
raj@node1$ sudo -u www-data /usr/commands