Re: Temporarily suspend a user account?

From: Michael Nolan <htfoot(at)gmail(dot)com>
To: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Temporarily suspend a user account?
Date: 2015-02-06 22:04:20
Message-ID: CAOzAquLrqiWfGfRGpguhjd=_N5vwuQEToPxLTJp3tz_Du3=K2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/6/15, David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> On Fri, Feb 6, 2015 at 2:22 PM, Michael Nolan [via PostgreSQL] <
> ml-node+s1045698n5836989h83(at)n5(dot)nabble(dot)com> wrote:
>
>> Might not do what you want, but I just change the password.
>>
>>
> ​How do you do that and re-enable using the previous password?
>
> David J.

Encrypted passwords are kept in the pg_shadow file and should start with 'md5'.

Just save a copy of the encrypted password for that user and when you
want to re-enable that user do:

alter user xxx encrypted password 'md5xxxxxxxx';

I have tested this on 9.3.5.
--
Mike Nolan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message George Weaver 2015-02-06 22:07:01 Unknown error while running <> postgresql_installer_dc46cfee2c\getlocales.exe
Previous Message Josh Berkus 2015-02-06 21:46:25 A Core Team statement on recent conference events