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:UsersSiry>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.



43 thoughts on “How to solve ORA-28001: The password has expired

  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 2015-09-03 at 1:11 PM

    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 2016-01-29 at 12:11 PM

    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. It is really helped Thanks.

    1. Hello Suhasini, I am happy to help.

  14. Thanks it is really helpful.

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

    1. Obrigado, você é bem-vindo

  15. Omkarini Moole 2017-01-10 at 2:15 AM

    Thank you! It worked 🙂

    1. You are welcome 🙂

  16. vikaskulawade 2017-01-20 at 11:00 AM

    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 2017-12-06 at 7:44 AM

    It helped me a lot. Thank you very much

    1. You are welcome! 🙂

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

Leave a Comment

Your email address will not be published. Required fields are marked *