Solved

Messed up my systems default "root" user

Posted on 2003-12-03
6
498 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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.

749 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