Make sudo command not need sudo?
Make sudo command not need sudo?
I would like to set a specific command to not require sudo privileges, is there a way to accomplish this? I know you can add commands to the sudoer file to allow certain commands to be used by non root accounts, so maybe there is something similar for adding commands to allow regular users to use?
What do you mean by "not require sudo privileges"?
Do you mean not require root permissions? that depends on what are you trying to do. You'll need to make changes in your system to allow normal users to have permissions for it, and in many cases that's not possible (or very safe).
If what you mean is that you don't want to need to type"sudo" every time, but still be able to have the commands run with root permissions, then there's multiple ways to do this:
alias command='sudo command'. If you don't want to type the password, you can change the sudores file so that your user doesn't need to enter a password when running sudo for that command (someone else in the comments already explained how to do that, using an entry withNOPASSWD: /usr/bin/commandin the sudoers config).