I'm trying to use the -S stdin arg on sudo.
I tried this:
echo 'mypass' | sudo -S cat /etc/shadow
echo 'mypass\n' | sudo -S cat /etc/shadow
As the man pages suggest to add a newline.
Both won't work. What is wrong?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community