Confusion about sudo
Hello,
After adding what I thought were the correct entries in /etc/sudoers so I'd be able to run commands without needing to sudo them, I keep having to. My sudoers file entries look like this: Code:
## Allow root to run any commands anywhere Code:
wheel:x:10:root,user_me I appreciate any suggestions. |
redvelo,
Just continue sudo without password. If you want to work in terminal without need of sudoing just sudo to root and work: redvelo@host--$ sudo -i (or 'sudo -su') Password: <Enter> you continue executing everything as superuser. If at all you really need to avoid sudoing you can activate 'root' account and login as 'root', by that no more sudoing is necessary. What you are doing is truly dangerous according to current standards of defensive security. But I believe you know what you are doing. |
Thanks for the info, malekmustaq.
I'd really rather not be root for anything on the server, so I thought that adding myself to the wheel group would allow me to run things as root without actually being root, but maybe I misunderstand? Thannks again. |
redvelo,
Just in case you forgot to re-edit psswd and sudoer files: If you don't need it anymore you may remove your membership to GID "wheels", your entry to sudoer ALL is enough. Good luck and enjoy. |
The only entries I think you should need is this:
Code:
user_me ALL=(ALL) NOPASSWD: ALL |
Thanks nuwen52 & malekmustaq,
I went ahead and tried something. I've removed myself totally from sudoers. But, it seems that being a member of the wheel group covers me for being able to sudo all commands by virtue of this line in sudoers? In other words, being a member of wheel makes it unnecessary for me to be specified at all in sudoers. Code:
## Allows people in group wheel to run all commands Thanks again. |
That should allow all users in the wheel group to run programs with sudo, and they will need a password. And, since you are a member of wheel, this will work. So, the short answer, is yes. Personally, I would go with the single entry for just you. But, that's up to you.
|
Great, thanks for the clarification.
|
All times are GMT -5. The time now is 09:23 PM. |