Skip to content

Instantly share code, notes, and snippets.

@tonejito
Created June 18, 2018 20:40
Show Gist options
  • Save tonejito/0e0a2e5fef486251b48b8c37d06f0bea to your computer and use it in GitHub Desktop.
Save tonejito/0e0a2e5fef486251b48b8c37d06f0bea to your computer and use it in GitHub Desktop.
What if `root` was one of us?

If root had a name, what would it be like?

$ getent passwd root | awk -F : '{print $5}'
Charlie root

And would you call it to his face

$ write root
write: root has messages disabled

If you were faced with him in all his glory?

$ su -
Password: 
su: Authentication failure

What would you ask if you had just one question?

$ sudo getent shadow

yeah, yeah, /etc/passwd is great yeah, yeah, /etc/shadow is good

for x in {1..4} ; do echo -n "yeah," ; done
echo ""

What if root was one of us?

$ id root
uid=0(root) gid=0(root) groups=0(root)

Just a slob like one of us?

# usermod -aG slobs root

Just a stranger @ the bus

$ ssh root@bus
root@bus's password: 
Permission denied (publickey,password).

Trying to make his way home?

# cd $HOME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment