LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   providing the root access to normal user (https://www.linuxquestions.org/questions/linux-general-1/providing-the-root-access-to-normal-user-648481/)

raghuvamsi 06-11-2008 12:23 AM

providing the root access to normal user
 
hi guys!!

i have one requirement like, providing the root access to the normal users.

i have tried with su, but it is creating another shell, which is not usefull for me.

through a script i have to provide the root access to the users that are executing it.

i have some script with following statement:
/usr/sbin//usermod -s /bin/bash root

will the above one modifies the normal user to root with root access

please let us know

jtshaw 06-11-2008 12:30 AM

What you want is sudo. When setup correctly, sudo can let normal users run programs as if they are the root user.

Checkout the Sudo Manual for more information.

Nylex 06-11-2008 12:37 AM

Quote:

Originally Posted by raghuvamsi (Post 3181157)
i have some script with following statement:
/usr/sbin//usermod -s /bin/bash root

will the above one modifies the normal user to root with root access

All it does is to change root's shell to /bin/bash.

jschiwal 06-11-2008 12:38 AM

Linux doesn't honor suid scripts because they are not secure. Which commands do you want run as root? Commands like mounting cdrom or shutdown, etc. can be added to /etc/sudoers. You edit /etc/sudoers with the visudo program.

You should only run commands as root that need root access. Don't mess with usermod.

Another approach is to use PolicyKit.


All times are GMT -5. The time now is 10:55 AM.