Skip to main content

linux - How to provide password directly to the sudo su - in shell scripting

I got a requirement to automate in shell script for sudo su - which asks for password.


How to provide password directly to the sudo su - in shell scripting for IBM AIX servers. I have tried using echo | sudo su - it did not work. kindly help on this.

Comments