GeneralBear
GeneralBear

Reputation: 1021

Changing postgres password for enduser

is it possible to change an encrypted password with a sql query?

I have a user who for some reason can't log in and can't make her reset password recredentialing work.

Upvotes: 1

Views: 82

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 246798

This is simple: just use ALTER ROLE with the encrypted password.

ALTER ROLE luser PASSWORD 'md565b6fad0e85688f3f101065bc39552df';

Be aware that the password might end up in the log file if logging is configured appropriately.

Upvotes: 2

Related Questions