pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Deactivate/disable User id in Postgres
Date: Sun, 10 May 2020 07:26:35 -0500
Message-ID: <90ea24a1-1a28-746d-d94a-bc17a430f4a4@gmail.com> (raw)
In-Reply-To: <1590FC39-7BA9-4B29-953E-7C01E70E52E9@gmail.com>
References: <CAOasRJb7gKDZMjfVAmh2Bg4hGfm_=qoE8LvJimhY7mATbN=pmA@mail.gmail.com>
	<1590FC39-7BA9-4B29-953E-7C01E70E52E9@gmail.com>

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.

view thread (8+ messages)  latest in thread

Message-ID: <90ea24a1-1a28-746d-d94a-bc17a430f4a4@gmail.com>
Permalink:  ../90ea24a1-1a28-746d-d94a-bc17a430f4a4@gmail.com/
Also on:    postgresql.org/message-id/90ea24a1-1a28-746d-d94a-bc17a430f4a4@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Deactivate/disable User id in Postgres
  In-Reply-To: <90ea24a1-1a28-746d-d94a-bc17a430f4a4@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox