Change a user password in Solaris

Posted November 11, 2003 by Rex in Solaris system administration

To change a user’s password, you must either know the existing password or have superuser (root) access to the system. If you know the user’s password and are logged in as that account, simply follow these steps:

passwd: Changing password for qmchenry
Enter login password: {OLD_PASSWORD}
New password: {NEW_PASSWORD}
Re-enter new password: {NEW_PASSWORD}
passwd (SYSTEM): passwd successfully changed for qmchenry

After starting the passwd program, you will be prompted to enter the current password {OLD_PASSWORD}, then to enter the new desired password twice {NEW_PASSWORD}. If there is a problem such as new passwords not matching, new password too similar to the old password, or other issues, passwd will let you know with an error message and will usually ask you to try again.

If you have superuser access to the system, you can change any password without knowledge of the existing password (which is very handy when users forget their passwords since it is nontrivial to reclaim a hashed password). As root, run the same program (passwd) and follow the instructions. The only differences are that you need not enter the existing password and many errors will become warnings because the program will let root do what root wants (even if it is a bad idea).

The Conversation

Follow the reactions below and share your own thoughts.

  • Mick

    Thanks for your article

  • R K Mohanta

    In one of server SAS ETL is installed and all libname are using that user id and password so how i will change this without down time

  • Bob

    For changing password as a super user, run the command passwd ‘username’

    • Anonymous

      how to restrict the user for changing the password

  • Anonymous

    if i am the superuser how to restrict the user to change the password

  • Anonymous

    if i am superuser then how to restrict the normal users to
    changing the password

  • i want to delete the user password ,what is the command in solaris

  • Yasir

    I used the command passwd but after asking for new password two times it gives the message” permission denied “

  • ram

    how will create password less user on solaris