Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
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.
|
 |
06-16-2004, 07:34 PM
|
#1
|
Member
Registered: May 2004
Posts: 47
Rep:
|
changing UID of a user to "0"
Hi,
I changed the UID of a regular user account to 0 and root to 600 and the regular user account can execute root priviledges. I wonder if it is posible to have 2 or more root users on a linux box?
Thanks
|
|
|
06-16-2004, 09:00 PM
|
#2
|
Member
Registered: Mar 2004
Location: Virginia
Distribution: PacketProtector
Posts: 331
Rep:
|
I know of no reason why you cannot have multiple users as root (i.e. UID 0). Keep in mind that when you make a file as a user with a UID of 0 it will not display that users name of the user who created it (when you do a ls -l). As I understand it, the ownership of a file is not saved as the username (or group name as the case may be), but as the UID (or GID), so your "regular user" with a UID of 0 will create files with this UID and since the first user to translate out to the UID in the /etc/passwd file will likey be root, root will show as the owner of these files.
Also please keep in mind all of the standard warning messages that go along with extensive use of a root (UID 0) account. It is amazingly easy to do very bad things to your system in a hurry if you are not careful.
|
|
|
06-16-2004, 09:21 PM
|
#3
|
Member
Registered: May 2004
Posts: 47
Original Poster
Rep:
|
I was gonna use this on one of the servers on my office. One programmer has changed the root password and didn't gave me a copy. I tend to change my account's UID to 0 as a BACK-DOOR to root access without him knowing. Do you think this is the best resort for my situation?
|
|
|
06-16-2004, 10:19 PM
|
#4
|
Senior Member
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658
Rep:
|
Whoever is admin of the box is much better using sudo to give other users access to root level commands. Giving out the root password to multiple users or having multiple UID 0 acounts is really a bad idea and can cause problems (users being able to lock the admin out is just one example) and also is a logging nightmare. Plus with sudo, you can limit what access the "privileged" users have on a more granular level.
|
|
|
06-16-2004, 11:09 PM
|
#5
|
Member
Registered: May 2004
Posts: 47
Original Poster
Rep:
|
thanks for your reply.
|
|
|
06-16-2004, 11:31 PM
|
#6
|
Member
Registered: Jul 2001
Location: California, US
Distribution: Slackware
Posts: 196
Rep:
|
My workstation has 2 users with the UID of 0 and I havent noticed any issues in the 3 years that I've had it set up like this other than any files created by the non root named one says they're owned by root ( which is just because root is at the top of the list in /etc/passwd ). Back when I set this up though I did notice a lot of problems with getting rid of the root user so I wouldn't recommend trying that. What I did on my machine was set my root password to 100+ character password that way it wont be easy to crack the password for about another 50 years. Make sure you remember what the password is though because there are times that some programs ask for your root password ( like when you have issues changing to a RW root file system on boot. )
|
|
|
All times are GMT -5. The time now is 04:46 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
|
|