pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Deactivate/disable User id in Postgres
8+ messages / 6 participants
[nested] [flat]

* Deactivate/disable User id in Postgres
@ 2020-05-04 11:29  Rajin Raj <rajin.raj@opsveda.com>
  0 siblings, 2 replies; 8+ messages in thread

From: Rajin Raj @ 2020-05-04 11:29 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

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 *

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Deactivate/disable User id in Postgres
@ 2020-05-04 11:50  John Scalia <jayknowsunix@gmail.com>
  parent: Rajin Raj <rajin.raj@opsveda.com>
  1 sibling, 1 reply; 8+ messages in thread

From: John Scalia @ 2020-05-04 11:50 UTC (permalink / raw)
  To: Rajin Raj <rajin.raj@opsveda.com>; +Cc: pgsql-admin@lists.postgresql.org

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 

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Deactivate/disable User id in Postgres
@ 2020-05-04 14:45  Rui DeSousa <rui@crazybean.net>
  parent: Rajin Raj <rajin.raj@opsveda.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Rui DeSousa @ 2020-05-04 14:45 UTC (permalink / raw)
  To: Rajin Raj <rajin.raj@opsveda.com>; +Cc: pgsql-admin@lists.postgresql.org



> On May 4, 2020, at 7:29 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 

Using external authentication is an option too. i.e. using LDAP; disabling the account in LDAP means the user cannot login.=

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Deactivate/disable User id in Postgres
@ 2020-05-10 12:24  Ron <ronljohnsonjr@gmail.com>
  parent: Rui DeSousa <rui@crazybean.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Ron @ 2020-05-10 12:24 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On 5/4/20 9:45 AM, Rui DeSousa wrote:
>
>
>> On May 4, 2020, at 7:29 AM, Rajin Raj <rajin.raj@opsveda.com 
>> <mailto: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 *
>
> Using external authentication is an option too. i.e. using LDAP; disabling 
> the account in LDAP means the user cannot login.

That would be a disaster in an enterprise that has many systems, and uses 
LDAP/AD for account management.

-- 
Angular momentum makes the world go 'round.

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Deactivate/disable User id in Postgres
@ 2020-05-10 12:26  Ron <ronljohnsonjr@gmail.com>
  parent: John Scalia <jayknowsunix@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Ron @ 2020-05-10 12:26 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

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.

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Deactivate/disable User id in Postgres
@ 2020-05-10 13:20  Holger Jakobs <holger@jakobs.com>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Holger Jakobs @ 2020-05-10 13:20 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org,Ron <ronljohnsonjr@gmail.com>

Won't help if authentication doesn't use passwords.

Am 10. Mai 2020 14:26:35 MESZ schrieb Ron <ronljohnsonjr@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.

-- 
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Deactivate/disable User id in Postgres
@ 2020-05-10 14:45  Rui DeSousa <rui@crazybean.net>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Rui DeSousa @ 2020-05-10 14:45 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org



> On May 10, 2020, at 8:24 AM, Ron <ronljohnsonjr@gmail.com> wrote:
> 
> On 5/4/20 9:45 AM, Rui DeSousa wrote:
>> 
>> 
>> Using external authentication is an option too. i.e. using LDAP; disabling the account in LDAP means the user cannot login.
> 
> That would be a disaster in an enterprise that has many systems, and uses LDAP/AD for account management.
> 
> -- 
> Angular momentum makes the world go ‘round.

Hmm, enterprises do exactly that and once the account is disabled its disabled everywhere.  Single sign-on is very common practice these days.  I would agree if talking about a targeted specific system temporarily. 




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Deactivate/disable User id in Postgres
@ 2020-05-10 15:03  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Rui DeSousa <rui@crazybean.net>
  0 siblings, 0 replies; 8+ messages in thread

From: Scott Ribe @ 2020-05-10 15:03 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

> On May 10, 2020, at 8:45 AM, Rui DeSousa <rui@crazybean.net> wrote:
> 
> I would agree if talking about a targeted specific system temporarily.

Even then, of course you manage it with LDAP. By removing the user from the group that grants access to the db rather than deactivating the user. Really, it's the whole point of LDAP...




^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2020-05-10 15:03 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 11:29 Deactivate/disable User id in Postgres Rajin Raj <rajin.raj@opsveda.com>
2020-05-04 11:50 ` John Scalia <jayknowsunix@gmail.com>
2020-05-10 12:26   ` Ron <ronljohnsonjr@gmail.com>
2020-05-10 13:20     ` Holger Jakobs <holger@jakobs.com>
2020-05-04 14:45 ` Rui DeSousa <rui@crazybean.net>
2020-05-10 12:24   ` Ron <ronljohnsonjr@gmail.com>
2020-05-10 14:45     ` Rui DeSousa <rui@crazybean.net>
2020-05-10 15:03       ` Scott Ribe <scott_ribe@elevated-dev.com>

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