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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-05-2003, 08:08 AM
|
#1
|
LQ Newbie
Registered: Aug 2003
Location: KL
Posts: 14
Rep:
|
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?
|
|
|
08-05-2003, 08:26 AM
|
#2
|
Member
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362
Rep:
|
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?
|
|
|
08-05-2003, 08:26 AM
|
#3
|
Member
Registered: Jul 2003
Location: Gauteng, South Africa
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107
Rep:
|
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.
|
|
|
08-05-2003, 01:14 PM
|
#4
|
LQ Newbie
Registered: Jul 2001
Location: Nicaragua
Distribution: RH 7.1
Posts: 18
Rep:
|
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.
|
|
|
08-05-2003, 02:17 PM
|
#5
|
LQ Newbie
Registered: Aug 2003
Location: KL
Posts: 14
Original Poster
Rep:
|
thanks..changing the user ID certainly helped!
|
|
|
08-05-2003, 05:29 PM
|
#6
|
LQ Newbie
Registered: Aug 2003
Location: Durham, NC
Distribution: Red Hat 9
Posts: 7
Rep:
|
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
|
|
|
08-05-2003, 05:39 PM
|
#7
|
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185
Rep:
|
just use sudo, instead of giving a normal user access to the whole system by changing the user id
|
|
|
08-06-2003, 09:03 AM
|
#8
|
Member
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 07:06 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|