My boss want his team members to let him know, who has root access.
How do I check if I have root access?
If I can login on a server and do anything with
sudo, does it mean I have root access?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Yes. If you are able to use
sudo to run any command (for example
passwd to change the root password), you definitely have root access.
If you, for example, run
sudo -s and it gives you a shell, you may issue the
id command. It will respond with something like
uid=0(root) gid=0(root) groups=0(root)
A UID of 0 (zero) means "root", always.
Your boss would be happy to have a list of the users listed in the
/etc/sudores file. If there are groups listen in there, he would probably want to know who the members of those groups are.
For example, if the system has a
wheel) group which is listed in the
sudoers file like
%sudo ALL=(ALL:ALL) ALL
this gives free range to any member of the group to use
sudo without restriction. This is how you get all the usernames of that group:
$ grep '^sudo' /etc/group
$ getent group sudo
on systems using LDAP or NIS/YP, or some other directory service.