How to pass password using -S (stdin) in terminal? – Ubuntu
i am trying to pass the password using stdin but I am getting an error. Here is what I tried. echo myPassword | sudo -S su - userName -s /bin/bash echo 'myPassword' | sudo -S su - userName -s /bin/bash…