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?
Very basic question but can you confirm
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Very basic question but can you confirm
Confirmed! 
There are 10 types of people in this world, those who understand binary and those who don't
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Very basic question but can you confirm
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...
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
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:Can you change that user to have no privies at all? Or is that every other user only?
You may use -1PCSpectra wrote:Seems weird (from using databases) why any user would have ID zero...typically I use that value to indicate invalid user when authenticating...
There are 10 types of people in this world, those who understand binary and those who don't
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Very basic question but can you confirm
There can only ever be one super user, though? Can more than one user have the UID 0?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.
Re: Very basic question but can you confirm
Yup, use -1 man, that's the way I do it.VladSun wrote:You may use -1PCSpectra wrote: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
While useradd will complain that it's not a unique UID, you can always edit /etc/passwdPCSpectra wrote:There can only ever be one super user, though? Can more than one user have the UID 0?
Try and see it
There are 10 types of people in this world, those who understand binary and those who don't