I'm writing a script that requires root access for HP-UX. I was wondering if there was some way to pass in a password to the su root -c command so that the user would not be prompted for a password.
In this circumstance, I cannot use sudo because the command does not exist in HP-UX. Otherwise, I would use the command
echo $PASSWORD | sudo -S <command requiring root privileges>