I have this rule in my sudoers file
user ALL = (root) NOPASSWD:/usr/bin/supervisorctlNow I can run the command without root password.
For example :
sudo supervisorctl restart allMy question is How can I run the command without sudo command ?
supervisorctl restart all 1 1 Answer
One can set the setuid bit to have an executable run as the owner of the file, not as the user who starts the command. This approach can have serious security implications, though. So is, of course, also the removal of a password to run sudo.
Easier and much safer in your current situation is to create an alias:
alias supervisorctl='sudo supervisorctl'after which supervisorctl will automatically be interpreted as sudo supervisorct