Glam Prestige Journal

Bright entertainment trends with youth appeal.

I have this rule in my sudoers file

user ALL = (root) NOPASSWD:/usr/bin/supervisorctl

Now I can run the command without root password.

For example :

sudo supervisorctl restart all

My 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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy