From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Removing a user's password |
Date: | 2003-06-06 15:07:14 |
Message-ID: | 200306061507.h56F7EX18373@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Here is a patch to allow users to remove their passwords. VALID UNTIL
does work for disabling an existing password, but only for superusers.
Is NONE the proper syntax?
ALTER USER postgres PASSWORD NONE
Is NULL better? I didn't like DROP PASSWORD because we don't use ADD
PASSWORD, particularly because we don't know at that point whether they
have a password or not.
---------------------------------------------------------------------------
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> If you set VALID UNTIL to 'now' (or sometime in the past), you've
> >> effectively prevented him from logging in with the password ---
> >> more effectively than setting the password to NULL, since if the
> >> user is still logged in he can just undo that. I don't think we
> >> really need to do anything more here.
>
> > Well, can they undo the VALID UNTIL too?
>
> No: a non-superuser can only set his password, not any other fields of
> his pg_shadow entry.
>
> > I think at a minimum we need
> > to document the proper procedure for removing a password. I see NULL as
> > a more logical way of removing the password rather than playing with
> > VALID UNTIL.
>
> It may be more logical, but it doesn't work as well.
>
> regards, tom lane
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 4.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-06-06 15:11:42 | Re: [HACKERS] Removing a user's password |
Previous Message | scott.marlowe | 2003-06-06 14:59:43 | Re: default locale considered harmful? (was Re: [GENERAL] |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-06-06 15:11:42 | Re: [HACKERS] Removing a user's password |
Previous Message | Peter Eisentraut | 2003-06-06 14:20:09 | Re: array support patch phase 1 patch |