How to change password of a user in Redshift database

Use the below command to change user password:

alter user username password 'valueforpassword';

Use the below command to set expiration date for password:

alter user username password 'valueforpassword' valid until '2021-12-31 23:59';
See also  How to list all the users of a group in Redshift database