How do I list all superusers?

Don’t forget to change the root password. If any user has UID 0 besides root, they shouldn’t. Bad idea. To check:

grep 'x:0:' /etc/passwd

Again, you shouldn’t do this but to check if the user is a member of the root group:

grep root /etc/group

To see if anyone can execute commands as root, check sudoers:

cat /etc/sudoers

To check for SUID bit, which allows programs to be executed with root privileges:

find / -perm -04000

Leave a Comment