alter password for an expired oracle ID noninteractively
Hello
We have oracle 11G and 12C in our environment and I am trying to see if there is a way to alter an expired password via a script
I am trying to use this
cat <<EOF | sqlplus ID/"RRR!rrrdjkfjfhjfhfh99999"@DB
ERErjrjr191919r1
ERErjrjr191919r1
exit
EOF
RRR!rrrdjkfjfhjfhfh99999 is the current password and ERErjrjr191919r1 is the new one. When I run this script however I am getting an error
SP2-0650: New passwords do not match
even though the lines are identical. Does anyone have a way to fix it or is the only way to accomplish that is by manually entering the new password twice?