pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Scalia <jayknowsunix@gmail.com>
To: Rajin Raj <rajin.raj@opsveda.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Deactivate/disable User id in Postgres
Date: Mon, 4 May 2020 07:50:30 -0400
Message-ID: <1590FC39-7BA9-4B29-953E-7C01E70E52E9@gmail.com> (raw)
In-Reply-To: <CAOasRJb7gKDZMjfVAmh2Bg4hGfm_=qoE8LvJimhY7mATbN=pmA@mail.gmail.com>
References: <CAOasRJb7gKDZMjfVAmh2Bg4hGfm_=qoE8LvJimhY7mATbN=pmA@mail.gmail.com>

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 

view thread (8+ messages)  latest in thread

Message-ID: <1590FC39-7BA9-4B29-953E-7C01E70E52E9@gmail.com>
Permalink:  ../1590FC39-7BA9-4B29-953E-7C01E70E52E9@gmail.com/
Also on:    postgresql.org/message-id/1590FC39-7BA9-4B29-953E-7C01E70E52E9@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: jayknowsunix@gmail.com, rajin.raj@opsveda.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Deactivate/disable User id in Postgres
  In-Reply-To: <1590FC39-7BA9-4B29-953E-7C01E70E52E9@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