root access
How do I grant root access to a user without giving root/password?
|
Quote:
http://linux.die.net/man/8/sudo |
Quote:
Add these below lines in /etc/sudoers file. username ALL=(ALL) ALL Note: Explore more for sudo configuration. http://www.sudo.ws/sudo/man/1.8.6/sudoers.man.html . (This is man sudoers of 1.8.6 version) |
Usually when this question is asked there is a lack of trust to the users that have to have administrative rights for their job. So giving them total root access with this line
Code:
username ALL=(ALL) ALL To really give you the best advice it is necessary for us to know what exactly you are planning to allow to the user in question. I have seen it many times that people recommend sudo for a purpose when the Unix/Linux file permissions are a much better way to do the job. Please explain more specific what you plan to do. |
Quote:
Read the man page link which I pasted ,it is helpful and do the google search you will get many examples . Another best practice is to create alias of commands and assign it to group or user in /etc/sudoers. Below is the example, Cmnd_Alias SHELLS=/usr/bin/sh, /usr/bin/ksh, /usr/bin/csh Cmnd_Alias SU=/bin/su %grouname ALL=ALL, !SHELLS, !SU username ALL=ALL, !SHELLS, !SU Just explore more, read more,execute and enjoy the power of sudo |
All times are GMT -5. The time now is 10:07 AM. |