How to diff between 2 users with uid 0

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

How to diff between 2 users with uid 0

Postby urip on Sun Mar 24, 2013 4:32 am

Hello,
I created a new user "rootNew"
After creation I manually change the file /etc/passwd and gave the new user "rootNew" uid 0.
Now I have 2 users with uid 0 (root,rootNew).
"whoami" command return "root" for both users.
How can I know which user is log in the system?

Thanks,
Uri
urip
Level 1
Level 1
 
Posts: 2
Joined: Sun Mar 24, 2013 4:30 am

Linux Mint is funded by ads and donations.
 

Re: How to diff between 2 users with uid 0

Postby karlchen on Sun Mar 24, 2013 7:11 am

Hello, Uri.

UIDs on a Linux system have to be unique. This means there can only be one single user having the UID 0. Creating a second user and assigning UID 0 to him will have no visible effect at best or result in some things malfunctioning.
User root is the Linux superuser. You cannot clone this account. root must exist, be named root and have UID 0.
End of the story.

Kind regards,
Karl
User avatar
karlchen
Level 12
Level 12
 
Posts: 4163
Joined: Sat Dec 31, 2011 7:21 am

Re: How to diff between 2 users with uid 0

Postby Pierre on Sun Mar 24, 2013 8:01 am

instead of creating 'rootnew' - call the account Admin & have a higher uid than 0
then, on the user privileges tab - give the account holder, the same privileges as root.

this can be done with any account holder .. ...
Image
User avatar
Pierre
Level 7
Level 7
 
Posts: 1807
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: How to diff between 2 users with uid 0

Postby karlchen on Sun Mar 24, 2013 10:32 am

Hello, Pierre.

And what would be the benefit of having a second root-like account?

Karl
User avatar
karlchen
Level 12
Level 12
 
Posts: 4163
Joined: Sat Dec 31, 2011 7:21 am

Re: How to diff between 2 users with uid 0

Postby Pierre on Sun Mar 24, 2013 11:52 pm

Now I have 2 users with uid 0 (root,rootNew).
"whoami" command return "root" for both users.
How can I know which user is log in the system?


he currently has two root accounts, that he can't separate.

so, he needs to alter the second one, - to another user name, & give it root privileges.

then he will know - which user is logged into the system. .. .
Image
User avatar
Pierre
Level 7
Level 7
 
Posts: 1807
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.


Return to Newbie Questions

Who is online

Users browsing this forum: malligt, Mark Phelps, WinterTroubles and 29 guests