0

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?

Thanks

mike628
  • 309
  • 2
  • 5
  • 10

1 Answers1

0

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.

AlexD
  • 8,747
  • 2
  • 29
  • 38
  • 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