Use sudo with password as parameter

Viewed 180513

I would like to run sudo with my password as parameter so that I can use it for a script. I tried

sudo -S mypassword execute_command

but without any success. Any suggestions?

5 Answers
Related