How to solve ORA-28001: The password has expired


The other day I was happily opening SQL Developer when I found this horrible thing.


Here is how to solve it.

  1. Connect as sysdba to the database.
    C:\Users\Siry>sqlplus / as sysdba
  2. Run the query to set the password’s life time to unlimited.
    Profile altered.
  3. Set a password for the locked user.
    SQL> ALTER USER user_name IDENTIFIED BY password;
    User altered.
  4. Unlock the user account.
    User altered.
  5. Make sure your user is not locked anymore.
    ------------------------------ --------------------------------
    HR                             OPEN
    ANONYMOUS                      OPEN
    APEX_040000                    LOCKED
    FLOWS_FILES                    LOCKED
    XDB                            EXPIRED & LOCKED
    CTXSYS                         EXPIRED & LOCKED
    MDSYS                          EXPIRED & LOCKED
    SYSTEM                         OPEN
    SYS                            OPEN
    user_name                      OPEN
    SIRY                           OPEN
    ------------------------------ --------------------------------
    APEX_PUBLIC_USER               LOCKED
    XS$NULL                        EXPIRED & LOCKED
    OUTLN                          EXPIRED & LOCKED
    15 rows selected.

Remember that all the text in Italics represents variables and should be replaced with your own values.

Please note that this may NOT be the best option for you specially if you are not using your database only for development/testing which is my case. I do not recommend to do this in a production environment.


Hey! checkout my other blog at and let me know what you think

This post will be moved in the future to a new blog dedicated only for IT stuff, this one right here:


  1. It worked! Thanks!!! 🙂

    1. You’re very welcome 🙂

  2. Very helpfull!!! thanks

    1. You’re welcome!

  3. Отлично! Спасибо

    1. Добро пожаловать!

  4. Thank you

    1. You are welcome 🙂

  5. Ragavendran · · Reply

    Thank you, Issue : ORA-28001 is Resolved.

    1. You’re very welcome

  6. Thank you for this post. It is really useful.

    1. Hello, you are welcome, I am glad it helps.

  7. Hexphoto, You’re my hero!

    1. Hello Aron, I am glad this was helpful, cheers!

  8. Thank you .

    1. Hello Devi, you are welcome, happy new year!

  9. Adriano Rapussi · · Reply

    Thank you, it helped a lot, had no idea how to solve this either.

    1. Hello Adriano, you are very welcome, I am glad it was helpful

  10. Worked. Very helpful..Thanks

    1. Your are welcome 🙂

    1. You are welcome 🙂

  11. This was very helpful!

    1. Thanks, I am glad I can help 🙂

  12. Thanks! Your instructions were clear and easy to follow.

    1. Hello Jose, thank you. I am happy to help.

  13. suhasini · · Reply

    It is really helped Thanks.

    1. Hello Suhasini, I am happy to help.

  14. suhasini · · Reply

    Thanks it is really helpful.

    1. Hello Suhasini, thanks, good to know it helps.

    1. Obrigado, você é bem-vindo

  15. Omkarini Moole · · Reply

    Thank you! It worked 🙂

    1. You are welcome 🙂

  16. vikaskulawade · · Reply

    It’s Working..Thanks

    1. You are welcome 🙂

    1. No problem, good to know it helps 🙂

  17. After doing all the above steps now i am getting another error 1017.. invalid password ,username

    1. Hello Poonam, you will need to provide more information about your specific problem, this usually works for me. Although I think that error is very straight forward, make sure you are using the correct username and password.

  18. V S Raghunadh · · Reply

    It helped me a lot. Thank you very much

    1. You are welcome! 🙂

  19. thanks a lot, it’s worked 🙂

    1. You are welcome my friend!

  20. sudheer Kumar · · Reply

    It is working fine Thanks for the blog

    1. You are welcome, I am glad it is helpful

  21. Thanks its good conten.

  22. Thank youuuu

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: