You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Secure way to do a sudo on linux server

in Linux 7 comments

Summary: We have a need to limit a linux user's ablilty to Sudo to specific other users

 We have 2 options for the Entry on /etc/suoders.d.

 

Which among these you recommend.

 Option A:

Cmnd_Alias SU=/bin/su - oracle, /bin/su - grid

username  ALL=PASSWD:SU

 this allows sudo su - oracle and sudo su - grid

Option B:

username ALL=(oracle,grid) ALL

this allows sudo -i -u oracle and sudo -i -u grid


For both the options, it doesn't allow sudo to root which is expected in our case. Now, we want to which option is more secure and recommended one from Linux Security point of view?

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!