Vertica Quick Tip: Expiring a User’s Password

Posted February 22, 2018 by Soniya Shah, Information Developer

This blog post 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!