How to change the password from SQL*PLUS

How can user change his password without an assistance from DBA?

Password management can only be made by applications such as SQL*Plus that correctly implements OCIPasswordChange() OCI call.

Using SQL*Plus password command:

sqlplus username/password
SQL> password
Changing password for USERNAME
Old password:
New password:
Retype new password:
Password changed
SQL>

Using ALTER USER command:

SQL> ALTER USER <username> identified by <new password> replace <old password>;

REPLACE clause started appearing from version 8.1.6.0.0

Comments