Friday, 9 August 2013

Confused on sudo vs su and running scripts

Confused on sudo vs su and running scripts

When I do sudo su - john I become user john without asking for a password.
But when I do: sudo su - john /usr/share/script_to_run.pl I am asked for a
password. Same also for sudo -u john /usr/share/script_to_run.pl
Why? What am I doing wrong here?

No comments:

Post a Comment