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
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
$ 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:-
$ 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
Why do you want to do that? What about the extreme security risk?
1 Like