Solved

Messed up my systems default "root" user

Posted on 2003-12-03
6
495 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

840 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