Passing password to su command for sshexec from ant
Is there a way to pass the password to the linux command? su? I am trying to automate deployment using sshexec and Ant. As part of this, I need to execute the su command, but I cannot find the password. The su command does not have the -S switch like sudo does. I tried using the commandResource and input properties on sshexec, but I just got "su: Sorry" back.
Before anyone thinks that I don't store passwords in files. The script being executed will be generated in memory in Ant based on a password prompt.
+2
source to share
1 answer
Not an expert on this, but you should probably use sudo instead of su. The following thread might help more pass-password-to-su-sudo-ssh
+1
source to share