I want to write a shell script that can login to root user and it should carry password inside the same script. It should not ask for password on the terminal.
I have written a script that works fine, but it is asking for password on the terminal, I want to automate this process by giving the password inside script only.
id sudo -s <<EOF echo Now i am root id mkdir someDir whoami EOF
note: i want to get it done without touching /etc/sudoers file.