Changing password doesn’t work

authenticationoracle

I need to login to a database. I have good credentials, but when I was trying to login with SQL Developer, I got this error message:

ORA-28001: the password has expired

Then I tried to login with SQL*Plus, which worked fine, I connected successfully and I was asked to change my password.

So I typed in a new password and then retyped it. Then I got other message:

ORA-01017: invalid username/password; logon failed

Can you help me how can I change this password? I don't have administrative permissions.

Best Answer

I suggest the following:

At first login as SYSDBA and check the ACCOUNT_STATUS of your user (SYSTEM in the sample below).

> sqlplus / as sysdba
SQL> select username, account_status, lock_date from dba_users where username='SYSTEM';

If this statement doesn't return a record, then your account does not exist.

If the account is locked (maybe because you entered a wrong password several time) then you have to unlock the account:

SQL> alter user SYSTEM account unlock;

To reset the password you can use this statement:

SQL> alter user SYSTEM identified by NEW_SYSTEM_PWD;

If you are working with a development system, then you can ignore case sensitive logons and make sure passwords never expire again:

SQL> alter system set sec_case_sensitive_logon=false scope=both;
SQL> alter profile default limit password_life_time unlimited;

See Oracle documentation for further infos regarding DBA_USERS