Database Administration (MOSC)

MOSC Banner

alter password for an expired oracle ID noninteractively

edited Sep 16, 2016 5:09PM in Database Administration (MOSC) 6 commentsAnswered ✓

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?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center