Where are the sudo privileges stored?

sudo

On my (home) Ubuntu 22.04.4 LTS machine I have unlimited sudo:

$ sudo -l 
User <me> may run the following commands on <me>-home:
    (ALL : ALL) ALL

However, I do not see my user-id in the file /etc/sudoers and there are no files in /etc/sudoers.d except a README file that does not have my user-id in it.

Where does Ubuntu store the info that I have sudo?

Best Answer

It's not necessarily explicitly stored; which subset of commands you'd be able to run is inferred by how your /etc/sudoers is structured; and /etc/sudoers doesn't necessarily need to address single users. I bet your /etc/sudoers has this line in it?

%sudo   ALL=(ALL:ALL) ALL

Which means in this case your privileges are inferred from the groups you belong to (namely, in this case, sudo).