From: | David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Temporarily suspend a user account? |
Date: | 2015-02-06 21:15:41 |
Message-ID: | 1423257341072-5836982.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
http://www.postgresql.org/docs/9.4/interactive/sql-alterrole.html
David J.
--
View this message in context: http://postgresql.nabble.com/Temporarily-suspend-a-user-account-tp5836978p5836982.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | David G Johnston | 2015-02-06 21:18:12 | Re: Temporarily suspend a user account? |
Previous Message | Melvin Davidson | 2015-02-06 21:11:22 | Re: Temporarily suspend a user account? |