Expiring User's Password

This tip was authored by Jim Knicely.

You can expire a user’s password immediately using the ALTER USER statement’s PASSWORD EXPIRE parameter.

By expiring a password, you can:

• Force users to comply with a change to password policy.
• Set a new password when a user forgets the old password.

This feature also comes in handy when you as an admin are asked to replicate users on one database to another. You can easily create the remote user, but how do you set the user’s password being that you don’t know the password? That’s where the PASSWORD EXPIRE parameter comes to the rescue. Simply create the user then expire the user’s password. This will require the user to set their password the next time they log on.

Example:

dbadmin=> CREATE USER jim;
CREATE USER

dbadmin=> ALTER USER jim PASSWORD EXPIRE;
ALTER USER

dbadmin=> \q

[dbadmin@s18384357 ~]$ vsql -U jim
The password has expired.

Changing password for jim
New password:
Retype new password:
Password changed.

Welcome to vsql, the Vertica Analytic Database interactive terminal.

Type:  \h or \? for help with vsql commands
       \g or terminate with semicolon to execute query
       \q to quit

jim=>

Have fun!

Comments

  • krishnamrajukrishnamraju Community Edition User
    It is useful if a user uses vsql . How a user can get password change prompt , if user login using dbvisulizer like tool.
  • Jim_KnicelyJim_Knicely - Select Field - Administrator
    edited February 2018

    Yup, we have no control over every client out there! A user will have to take a very few minutes to run vsql to reset their password. I see that there is an option in DbVisualizer for Oracle password resets and will therefore ask if they can implement the same feature for Vertica. Same concept.

    See:
    http://confluence.dbvis.com/display/UG100/Changing+an+Oracle+Password

Sign In or Register to comment.