Solved

Messed up my systems default "root" user

Posted on 2003-12-03
6
491 Views
Last Modified: 2013-12-15
Ok, I added a new user with a UID of 0, meaning this user has superuser privileges.  Everything seemed to be working fine, until I noticed that now all the files that normally belong to the user "root" (the default root user) now belong to this new user.  Also, the command "su" now logs onto this new users account, instead of the default "root" account.  How do I fix my system so the files once again belong to "root" instead of this new user, and so that "su" defaults to the root account (of course you still need a password, etc)

Thanks
0
Comment
Question by:nexisvi
6 Comments
 
LVL 18

Accepted Solution

by:
liddler earned 50 total points
ID: 9868868
remove the other user, the files are awned by UID 0 and su makes you the user with UID 0. Best not to have another user UID 0 , use sudo to give another user root privs
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9868873
uid 0 belongs to root and u should have given it to any other users.
if u want user to give root access, give him su access. and him to root group.

u can possible delete the user entry from password file. keep all his directory and all.

then login as a root and
chown(chage owner) back to root to the files which used to belong root.
0
 
LVL 18

Expert Comment

by:liddler
ID: 9868930
shivsa,
"shouldn't" have to chown as the files will be owned by UID 0, so it's just the OS parsing the passwd file and getting the wrong username for UID 0, if there is only root having UID 0, it will report root as the owner of the files again
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 24

Expert Comment

by:shivsa
ID: 9868961
but group must have got changed, so anyway he has to run to make sure he has root group also.
0
 
LVL 7

Expert Comment

by:glassd
ID: 9869927
On some OS's it is possible to add a second user with ID 0, but the true root account should be first in the password file. I've used the method to give a user temporary root access with their own password while ensuring that the real root password is available for the admins.
0
 

Author Comment

by:nexisvi
ID: 9870253
I had to completely remove the user from the system.  The order in the passwd file didn't matter, no matter where I put the user and the "root" user, it would still see this new user as the main "root" user.  Once I erased the user, it was back to normal.

thanks for all the suggestions
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now