I'm completely new to the Linux world, but I've been able to complete a few tasks on my own.
Now, I have a task to complete that's driving me crazy.
I need to be able to send the password to sudo
, since I can't prompt the user for the password.
What I've been able to find is
echo myPassword | sudo -s
Apparently -s
allows sudo
to receive the password through command input, and not user input.
I can't render my user so sudo
won't ask me for password, since I don't know who will use this script, the script has access to their password and account names, the only thing I need it to be able to automate sudo
.
PS: English is not my native language, sorry if I made any mistakes.