I have to execute a shell script as another user, but without being prompted for a password.
I've edited the
/etc/sudoers file with
visudo, adding the following line.
_www localhost=(otheruser) NOPASSWD:bin/sh /path/to/my/script.sh
If I understand how
sudo works, this means that the user
_www is allowed to execute like user
otheruser, without being prompted for password, only from localhost.
Is that correct? Because the system continues to prompt for the password.