Home Man
Search
Today's Posts
Register

BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

How to give root access to non root user?

Tags
shell scripts

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 04-30-2013
How to give root access to non root user?

Currently in my system Red Hat is installed. And Many user connect to my machine via SSH Techia Terminal.
I want to give some users a root level access.
Can anyone please help me how to make it possible. I too searched on the Google but didn't find the correct way

Regards
ADI
# 2  
Old 04-30-2013
Code:
su <command>

# 3  
Old 04-30-2013
Sorry I didn't get you.
# 4  
Old 04-30-2013
Have a look at the manual pages for sudo and sudoers if they are installed. If not, have a look here

Basically, you can write rules for can be allowed to run certain commands. These can be scripts, or called in scripts.

Consider
Code:
$ ls -l
-rwxr-xr-x 1 ABCDE123 users        327 Jan  3 16:25 my_file
$ sudo chown ZYX99999 my_file
$ ls -l 
-rwxr-xr-x 1 ZYX99999 users        327 Jan  3

You could also do things such as:-
Code:
$ cat priv_script
#!/bin/ksh

print "I am running as `id -un`"
$ priv_script
I am running as ABCDE123
$ sudo su - ZYX99999 -c "/common/scripts/priv_script"
I am running as ZYX99999
$
$ sudo -u ZYX99999 ./priv_script
I am running as ZYX99999
$


Have a good search around these boards for hint on sudo too as many questions have already been asked and answered.



I hope that this helps,

Robin
Liverpool/Blackburn
UK
# 5  
Old 04-30-2013
Quote:
I want to give some users a root level access
Why do you want to do that? What about the extreme security risk?
The Following User Says Thank You to hanson44 For This Useful Post:
jacobs.smith (05-01-2013)
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Non root user access to /dev/mem Soumyadip Dutta UNIX for Advanced & Expert Users 13 08-09-2018 07:01 AM
Sudo access of rm to non-root user solaris_1977 Solaris 9 08-24-2017 02:40 PM
One user to su to another without allowing root access and password pokhraj_d UNIX for Advanced & Expert Users 6 04-18-2017 03:08 PM
Auditors want more security with root to root access via ssh keys dvbell SuSE 6 07-12-2013 09:33 AM
How to allow access to some commands having root privleges to be run bu non root user suryashikha UNIX for Dummies Questions & Answers 5 10-30-2009 05:46 AM
access user history as root sardare Shell Programming and Scripting 4 07-01-2009 12:09 PM
I can not access root user through LAN rizwan225 Solaris 6 03-18-2009 06:03 PM
How to give an ordinary user the superuser (root) ID which is 0 sharaola UNIX for Dummies Questions & Answers 9 10-12-2008 02:52 AM
user commands without root access emealogistics HP-UX 1 05-26-2007 11:04 PM
how to access root priveliges if root password is lost wojtyla Linux 1 02-18-2005 05:24 AM


All times are GMT -4. The time now is 05:22 AM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password