Re: Temporarily suspend a user account? - Mailing list pgsql-general

From Felipe Gasper
Subject Re: Temporarily suspend a user account?
Date
Msg-id 54D531EA.1050900@felipegasper.com
Whole thread Raw
In response to Re: Temporarily suspend a user account?  (David G Johnston <david.g.johnston@gmail.com>)
Responses Re: Temporarily suspend a user account?
List pgsql-general
On 6 Feb 2015 3:15 PM, David G Johnston wrote:
> Felipe Gasper wrote
>> Hello,
>>
>>     Is there a way to temporarily suspend a user account?
>>
>>     I would prefer not to revoke login privileges since that will break
>> things that mine pg_users and pg_shadow.
>>
>>     I also am trying to find something that is completely reversible, so
>> something like setting connection limit to 0, which would lose a
>> potentially customized connection limit, doesn’t work.
>>
>>     We do this in MySQL by reversing the password hash then running FLUSH
>> PRIVILEGES; however, that doesn’t seem to work in PostgreSQL/pg_authid
>> as some sort of cache prevents this from taking effect.
>>
>>     Has anyone else solved this issue? Thank you!
>
> Personally untested:
>
> ALTER ROLE role_name VALID UNTIL 'timestamp' --i.e., set that to sometime in
> the past
>

This doesn’t work, either, because it will clobber any custom expiration
time for the role …

-FG


pgsql-general by date:

Previous
From: Jerry Sievers
Date:
Subject: Re: Temporarily suspend a user account?
Next
From: Felipe Gasper
Date:
Subject: Re: Temporarily suspend a user account?