LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-05-2003, 07:08 AM   #1
frostbite
LQ Newbie
 
Registered: Aug 2003
Location: KL
Posts: 14

Rep: Reputation: 0
Root permissions


Hey..
I was wondering if there is any way of giving root permissions to selected users on my RedHat machine. I personally do not log in as "root" but use my own username instead. I sometimes find it troublesome when sometimes i get access denied and have to log in as root to fix a problem. I want to give my self, as in my username, root permissions so that i can log in with my username and still have all the permissions of a root?
 
Old 08-05-2003, 07:26 AM   #2
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
This is not a good idea from a security standpoint. One of the 2.5 million reasons why Windows has security problems is because everything is always run by Administrator or SYSTEM. One of the advantages to Linux, or any Unix-like operating system, is that the system is functional to a user without that user having enough access to erase every file in the system.

That being said, Linux also needs to be user friendly if it is going to continue to grow and propser. To make it more friendly to you, is there any single command that you run frequently that you are constantly being prompted for the root password for?
 
Old 08-05-2003, 07:26 AM   #3
jamie_barrow
Member
 
Registered: Jul 2003
Location: Gauteng, South Africa
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107

Rep: Reputation: 15
i dont think that is possible, but the 'su' command can give a user root access (or any other user for that matter) if they know the password for root. Although this wont allow you to log in as root by using your own username, it will temporarily allow you to use root's privelages while logged in under your username.
 
Old 08-05-2003, 12:14 PM   #4
barDo
LQ Newbie
 
Registered: Jul 2001
Location: Nicaragua
Distribution: RH 7.1
Posts: 18

Rep: Reputation: 0
Editing /etc/passwd

To have root permissions with your username, edit /etc/passwd file and change the user ID number to zero.

for example... if you want to amy get root permissions:

Original /etc/passwd file:

amy:x:505:100::/home/amy:/bin/false

here..amy's User ID is 505

now... amy with root permissions changing user ID:

amy:x:0:100::/home/amy:/bin/false

I hope it helps.
 
Old 08-05-2003, 01:17 PM   #5
frostbite
LQ Newbie
 
Registered: Aug 2003
Location: KL
Posts: 14

Original Poster
Rep: Reputation: 0
thanks..changing the user ID certainly helped!
 
Old 08-05-2003, 04:29 PM   #6
arkoseunc
LQ Newbie
 
Registered: Aug 2003
Location: Durham, NC
Distribution: Red Hat 9
Posts: 7

Rep: Reputation: 0
Be careful changing your user id to 0 to get root permission. I did this with RedHat 9 for the same reason you just did and I attempted to change my desktop in my username. When I did this something messed up and I can no longer log into that user name. I was going to just delete it and not worry, but because it was technically root I can't delete it and it isn't listed in the user names. So, it may seem easier, but once you start figuring stuff out it is much safer and just as easy in the long run to use su
 
Old 08-05-2003, 04:39 PM   #7
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
just use sudo, instead of giving a normal user access to the whole system by changing the user id
 
Old 08-06-2003, 08:03 AM   #8
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
I was going to suggest that you chmod 4755 whatever binaries are giving you problems. This is much easier and more secure because you are giving yourself root access per applications instead of the whole system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
root-like permissions ? bbbb Linux - Newbie 7 11-12-2005 06:03 AM
root permissions wass29 Slackware 3 05-10-2004 10:58 AM
permissions as root chlee Linux - Software 5 05-11-2003 08:49 PM
permissions as root in X chlee Slackware 1 05-10-2003 10:32 PM
root permissions explorer Linux - Newbie 3 03-06-2003 04:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration