7
waldz
3y

Sooo
Someone had that brilliant idea of changing user ID and group ID of root user in a server... Now root has no permissions.
How am I supposed to use that server now?

P.S: Don't ask me why they did that... I don't know and I didn't bother to ask.

Comments
  • 1
    Been there, changed sudoers file without visudo
  • 1
    @alexbrooklyn that doesn't sound as bad... You still have root access to fix it... In my case they modified the group file directly, root is not root anymore, just a user with no permissions
  • 0
    @waldz how much does that fuck with systemd for example
  • 0
    Didn't know this was possible.

    I mean yes, you can change the user name root to any id, but does sudo and su now also execute programs as the new root or do they use the uid 0?
  • 0
    Is sudo installed?

    What does:

    sudo -u \#0 id

    output?
  • 0
    @happygimp0 nope... You don't have permission to run su or sudo... root user can't even access it's home (/root)... Permission denied everywhere
  • 0
    @waldz

    No other user with sudo permissions?

    Well, i think you have to shutdown the server, and fix /etc/passwd from somewhere else. Is it a VM or does it run in real hardware?
  • 0
    @happygimp0 it's a vps they have a rescue mode... I'll use that to change GID back to 0
Add Comment