How to give root access to non root user?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to give root access to non root user?
# 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?
This User Gave Thanks to hanson44 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Non root user access to /dev/mem

Hi All, I have to install an application which needs access to system BIOS information. The application needs to be installed by non root user. How would i grant read privileges of /dev/mem file to the non root user so that it can capture system BIOS information while running the application?... (13 Replies)
Discussion started by: Soumyadip Dutta
13 Replies

2. Solaris

Sudo access of rm to non-root user

Hello, It is Solaris-10. There is a file as /opt/vpp/dom1.2/pdd/today_23. It is always generated by root, so owned by root only. This file has to be deleted as part of application restart always and that is done by app_user and SA is always involved to do rm on that file. Is it possible to give... (9 Replies)
Discussion started by: solaris_1977
9 Replies

3. UNIX for Advanced & Expert Users

One user to su to another without allowing root access and password

Hello Gurus, I want One user to su to another without allowing root access and password. I want to run a specific command as below from user am663: --------------------------------------------------------- sudo -u appsprj4 /home/appsrj4/scripts/start_apache.sh ------------------- But... (6 Replies)
Discussion started by: pokhraj_d
6 Replies

4. SuSE

Auditors want more security with root to root access via ssh keys

I access over 100 SUSE SLES servers as root from my admin server, via ssh sessions using ssh keys, so I don't have to enter a password. My SUSE Admin server is setup in the following manner: 1) Remote root access is turned off in the sshd_config file. 2) I am the only user of this admin... (6 Replies)
Discussion started by: dvbell
6 Replies

5. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

6. Shell Programming and Scripting

access user history as root

Hi, I need to access a user's command history. However, the dilemma is that he is logged in and so his current history is not yet flushed to .bash_history file which gets flushed when he logs out. Is there a way I can still access his most recent history? thank you, S (4 Replies)
Discussion started by: sardare
4 Replies

7. Solaris

I can not access root user through LAN

Dear i have installed Solaris 10 on SUN V240 after installation i can not access system through root user if i access system through any other user it conects but root is not connecting through LAN if i connect through SC and then access root though cosole -f command it also works kindly... (6 Replies)
Discussion started by: rizwan225
6 Replies

8. UNIX for Dummies Questions & Answers

How to give an ordinary user the superuser (root) ID which is 0

How to give an ordinary user the superuser (root) ID which is 0 (9 Replies)
Discussion started by: sharaola
9 Replies

9. HP-UX

user commands without root access

Hi I have been asked to find out how to 1) create users 2) reset passwords 3) kill processes that may require root privileges without having root password, sudo rights or rights to passwd command Any ideas? Thanks in advance (1 Reply)
Discussion started by: emealogistics
1 Replies

10. Linux

how to access root priveliges if root password is lost

wish to know how to access root password it root password is forgotten in linux (1 Reply)
Discussion started by: wojtyla
1 Replies
Login or Register to Ask a Question