Re: Deactivate/disable User id in Postgres - Mailing list pgsql-admin

From Ron
Subject Re: Deactivate/disable User id in Postgres
Date
Msg-id 90ea24a1-1a28-746d-d94a-bc17a430f4a4@gmail.com
Whole thread Raw
In response to Re: Deactivate/disable User id in Postgres  (John Scalia <jayknowsunix@gmail.com>)
Responses Re: Deactivate/disable User id in Postgres  (Holger Jakobs <holger@jakobs.com>)
List pgsql-admin
What about setting the password expiration to "now"?  That also would prevent the user from logging in.

On 5/4/20 6:50 AM, John Scalia wrote:
Setting the role for NOLOGIN is probably your best route. You could also revoke their privileges on any database object, if you were especially concerned.
Jay

Sent from my iPad

On May 4, 2020, at 7:30 AM, Rajin Raj <rajin.raj@opsveda.com> wrote:


Hi,

Is there any option to deactivate/disable a user id in Postgres?
I can think of below two options, 

ALTER USER <user_id> WITH CONNECTION LIMIT 0;
ALTER USER <user_id> WITH NOLOGIN

Is there any better approach? 

Regards,
Rajin 

--
Angular momentum makes the world go 'round.

pgsql-admin by date:

Previous
From: Ron
Date:
Subject: Re: Deactivate/disable User id in Postgres
Next
From: Holger Jakobs
Date:
Subject: Re: Deactivate/disable User id in Postgres