Can someone tell me how to run this without a password prompt:
systemctl restart [email protected]`
in my sudoers file I have:
<myadminuser> ALL=NOPASSWD: /usr/bin/systemctl [email protected] restart,/etc/init.d/openvpn
and in ~/.bashrc I have:
alias or="systemctl restart [email protected]"
Solutions that I have tried:
If I add "sudo" in the alias, a password is requested inside the terminal. If I don't add sudo in the alias, box pops up, requesting a password. Hence, I posted the question here.