Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to know how to change my effective uid

mike628@NASBD122F:/etc$ id -G 1000 0 121

I belong to these groups, but I cant do anything as root, when things are owned by root:root

and can someone explain this clearly?


share|improve this question
up vote 0 down vote accepted

Belonging to group root isn't equal to being root user because User ID (UID) and Group ID (GID) are different things and for most (all?) privileged activities you need to have effective UID == 0 and having GID == 0 is not enough for that.

To switch your effective user your need to use su or sudo commands.

share|improve this answer
I figured it out on my own ....edit the passwd file – mike628 Jun 19 '11 at 11:20
@mike628: Editing the password file to do what you want is not a good idea. Any programs run using your id will have full access to the system overriding entirely the intent of using unprivileged accounts. – BillThor Jun 19 '11 at 16:33
Hi Bill, My point was never to overide, but to understand what was/is going on under the hood.Now I can change it back to the correct setting. What I got out of it was that this can be done and how – mike628 Jun 19 '11 at 18:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.