List of Sudoers & How Do I Keep Myself As One

(JamesMillar) #1

This has me a bit stumped. I know how to add myself to the list of sudoers, I’ve done that a few times already but I keep getting dropped from in. I suspect there is an event that needs to be updated after manually changing that file. But I’m unable to locate any information in the development documentation. Does anyone know where I can find it? I hate logging into the server as root, I think it’s bad practice.

(Filippo Carletti) #2

This is what I have in /etc/sudoers.d/wheel:

%wheel        ALL=(ALL)       ALL

My user is the wheel group.

(JamesMillar) #3

That will work. But I had to uncomment the wheel group in the sudoers file. I’m sure at some point I’ll have to do it again.

(Filippo Carletti) #4

I didn’t need to change sudoers, see:

# grep wheel /etc/sudoers
## Allows people in group wheel to run all commands
# %wheel	ALL=(ALL)	ALL

I did this more than once, I’m sure it works.

(Giacomo Sanchietti) #5

Just drop your configuration inside the standard /etc/sudoers.d, this kind of configuration will be untouched by the template system :smile:

(JamesMillar) #6

Thanks! I’ll have to look into this.