[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Red Hat Enterprise Linux 5 - How to grant another user root permission (without having to use su -)

Posted on 2008-11-05
12
Medium Priority
?
3,138 Views
Last Modified: 2013-12-16
I need to know how to give another general user, root permissions so that I don't need to type su - in order to get root privileges. I want the user to login using their username, but have full root access as if they were logging in as root.

For example, I don't want this user to be prompted every time an administrative function needs to be performed.
0
Comment
Question by:fcgsupport
  • 4
  • 2
  • 2
  • +4
12 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 22890742
Hi,
use 'sudo'
It's perfect for your purposes.

http://www.courtesan.com/sudo/

wmp
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 22890770
0
 

Author Comment

by:fcgsupport
ID: 22890773
I said I need this to happen without using SU, SUDO, SU - or any variation of SU.

Thanks!
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 22890781
You only said 'su'
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 22890787
Seems you don't understand sudo, or haven't even looked at it.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 22890922
Can you explain your reasons for not wanting to use su or sudo.  It doesn't make sense to me.
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 22890934
why are you not puttying that user in root groups

or create a groups call admin, give this groups full permission of the system

now put user in that groups, so as a part of that groups that user would get all the permission as root user
0
 
LVL 48

Accepted Solution

by:
Tintin earned 750 total points
ID: 22891035
In answer to your original question, you can just change the uid of the user to 0, but as has been pointed out in many threads on similar topics, this is certainly NOT recommended.
0
 
LVL 12

Expert Comment

by:Hugh Fraser
ID: 22891195
"sudo" is the cleanest alternative, providing not only fine control over what root rights are given, but also providing an audit trail. If you want to make it transparent, define aliases for the functions you allow. For example,,

alias route="sudo /sbin/route"

coupled with an entry in the /etc/sudoers file with the NOPASSWD option will allow the user to use the standard route command.
0
 

Author Comment

by:fcgsupport
ID: 22891471
Thanks Tintin,

I read about using the '0' uid method. I tried this, but during login, there are some strange /home/username access issues. I have also tried to create a new user using useradd -u 0 -o -p password username, but it will not accept my password at login.

0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22891954
if you have specific command to run as root, then you give that user permission to run it as root with the set uid priv.

chmod u+s command

and this command (the file) should be owned by root.

If you can give a specific need then it might be easier to give you solution
0
 
LVL 10

Expert Comment

by:nabeelmoidu
ID: 22892968
if its typing sudo for each command  that u don't like, then sudo su - once will make ur user as good as a root user. its a one time command and you are like root for the rest of the time...
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question