Re: Removing a user's password - Mailing list pgsql-novice

From Tom Lane
Subject Re: Removing a user's password
Date
Msg-id 28881.1106624383@sss.pgh.pa.us
Whole thread Raw
In response to Removing a user's password  ("Rodolfo J. Paiz" <rpaiz@simpaticus.com>)
Responses Re: Removing a user's password
List pgsql-novice
"Rodolfo J. Paiz" <rpaiz@simpaticus.com> writes:
> I have learned how to ALTER USER to both set a password and change a
> password. However, I can't seem to *remove* a password.

AFAIR this isn't supported directly.  You can get the effect in two ways
though:

1. (language lawyer's way)

ALTER USER luser WITH VALID UNTIL 'yesterday';

The password is still there, but no longer usable.

2. (hacker's way)

UPDATE pg_shadow SET passwd = NULL WHERE usename = 'luser';

This really does reset the password, but it involves more intimacy with
the current system catalog representation than you might like --- ie,
it might possibly break in some future version of Postgres.

            regards, tom lane

pgsql-novice by date:

Previous
From: Alexander Borkowski
Date:
Subject: Re: Output HTML, or just a handle?
Next
From: Michael Fuhr
Date:
Subject: Re: extracting date from timestamp