T
T
Twelfth Doctor2016-12-26 19:35:39
linux
Twelfth Doctor, 2016-12-26 19:35:39

How to allow execution of certain commands without entering a password?

Hello! Such a question: I have a sudo user, I need to allow him to execute commands sudo apache2ctl graceful, sudo a2ensite xxxand sudo a2dissite xxxwithout entering the user's password. How to do it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Myvrenik, 2016-12-26
@verdex

/etc/sudoers
Be sure to find out the exact paths to apache2ctl , a2ensite and a2dissite using the which command , depending on the distribution, it can be either in /bin or /usr/bin, or somewhere else altogether.

D
display: block, 2016-12-26
@qork

In /etc/sudoers
username ALL=(ALL:ALL) NOPASSWD:ALL

S
Schoolboy., 2016-12-27
@viphorizon

visudo command

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question