ALTER USER lets you reset, expire, or disable a user's password in Redshift.
ALTER USER is the only supported way to update, expire, or disable a Redshift user's password without recreating the account. It works for both local and federated users.
The core clause is ALTER USER username WITH PASSWORD 'new_pw'
. Optional keywords let you force rotation, disable login, or set an expiry date.
Run ALTER USER analytics WITH PASSWORD 'Str0ng#2024'
. The new password is effective on the next connection attempt.
Use VALID UNTIL
: ALTER USER analytics PASSWORD VALID UNTIL '2024-06-30 23:59';
. The user keeps access until the timestamp.
Disable login with PASSWORD DISABLE
: ALTER USER temp_report PASSWORD DISABLE;
. The user cannot authenticate until you set a new password.
Rotate service-account passwords every 90 days, grant users minimal privileges, and audit PG_USER_INFO
to ensure no expired accounts remain active.
You must connect as a superuser or any user granted the ALTER USER
privilege. Regular users can change only their own password with ALTER USER CURRENT_USER
.
Yes. Execute ALTER USER CURRENT_USER WITH PASSWORD 'NewM3!'
. No extra privilege is needed.
Query PG_USER_INFO
or reconnect using the new credentials. If the login succeeds, the change is confirmed.
Wrong quoting: Redshift requires single quotes around the password. Double quotes throw a syntax error. Session reuse: An existing session keeps using the old password until reconnected.
No. You need superuser privileges or must be granted the ALTER USER privilege explicitly.
No. Redshift stores only a hash; the plain text is never written to system tables or STL logs.
Yes, if the jobs store credentials. Update the connection strings or rotate them to IAM-based authentication to avoid disruptions.