Page 1 of 1
Very basic question but can you confirm
Posted: Thu Nov 06, 2008 4:54 am
by alex.barylski
Is the root of the super user (root) always (at least) ZERO?
I know other users can be root, or at least given root access, but is the first user created (presumably) always super root and UID of ZERO?
Re: Very basic question but can you confirm
Posted: Thu Nov 06, 2008 6:43 am
by VladSun
Confirmed!

Re: Very basic question but can you confirm
Posted: Thu Nov 06, 2008 10:02 pm
by alex.barylski
Cool thank you.
Can you change that user to have no privies at all? Or is that every other user only?
Seems weird (from using databases) why any user would have ID zero...typically I use that value to indicate invalid user when authenticating...
Re: Very basic question but can you confirm
Posted: Fri Nov 07, 2008 6:08 am
by VladSun
PCSpectra wrote:Can you change that user to have no privies at all? Or is that every other user only?
I'm not sure what you mean. You can change the name of superuser from root to anything else. And you can make any user a superuser by chaning its UID/GID to 0/0.
PCSpectra wrote:Seems weird (from using databases) why any user would have ID zero...typically I use that value to indicate invalid user when authenticating...
You may use -1

Re: Very basic question but can you confirm
Posted: Sun Nov 09, 2008 2:36 am
by alex.barylski
I'm not sure what you mean. You can change the name of superuser from root to anything else. And you can make any user a superuser by chaning its UID/GID to 0/0.
There can only ever be one super user, though? Can more than one user have the UID 0?
Re: Very basic question but can you confirm
Posted: Sun Nov 09, 2008 3:06 am
by Luke
VladSun wrote:PCSpectra wrote:Seems weird (from using databases) why any user would have ID zero...typically I use that value to indicate invalid user when authenticating...
You may use -1

Yup, use -1 man, that's the way I do it.

Re: Very basic question but can you confirm
Posted: Mon Nov 10, 2008 4:01 am
by VladSun
PCSpectra wrote:There can only ever be one super user, though? Can more than one user have the UID 0?
While
useradd will complain that it's not a unique UID, you can always edit
/etc/passwd 
Try and see it
