pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Profile setup in PostgreSQL
6+ messages / 4 participants
[nested] [flat]

* Profile setup in PostgreSQL
@ 2019-08-02 11:25  Dhandapani Shanmugam <postgresql95@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Dhandapani Shanmugam @ 2019-08-02 11:25 UTC (permalink / raw)
  To: pgsql-admin

Hey,

I would like to know, do we have profile concept in PostgreSQL as like in
Oracle.
I have a requirement to expire user password in 90 days and in oracle, I
can achieve this by creating profile with custom requirements and assign it
to the users.  Similarly in PostgreSQL do we have options to restrict the
users on password complexity.

-D

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

* Re: Profile setup in PostgreSQL
@ 2019-08-02 12:06  Pepe TD Vo <pepevo@yahoo.com>
  parent: Dhandapani Shanmugam <postgresql95@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Pepe TD Vo @ 2019-08-02 12:06 UTC (permalink / raw)
  To: pgsql-admin; Dhandapani Shanmugam <postgresql95@gmail.com>

I want to know too.
I couldn't find the profile setting in Postgres as Oracle and all I do is "ALTER ROLE '${USER}' WITH PASSWORD '${password}' VALID UNTIL '${expiration_timestamp}';
thank you.
Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success 

    On Friday, August 2, 2019, 07:26:23 AM EDT, Dhandapani Shanmugam <postgresql95@gmail.com> wrote:  
 
 Hey,
I would like to know, do we have profile concept in PostgreSQL as like in Oracle.I have a requirement to expire user password in 90 days and in oracle, I can achieve this by creating profile with custom requirements and assign it to the users.  Similarly in PostgreSQL do we have options to restrict the users on password complexity. 
-D  

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

* Re: Profile setup in PostgreSQL
@ 2019-08-02 12:42  MichaelDBA <MichaelDBA@sqlexec.com>
  parent: Pepe TD Vo <pepevo@yahoo.com>
  0 siblings, 3 replies; 6+ messages in thread

From: MichaelDBA @ 2019-08-02 12:42 UTC (permalink / raw)
  To: Pepe TD Vo <pepevo@yahoo.com>; +Cc: pgsql-admin; Dhandapani Shanmugam <postgresql95@gmail.com>

First of all, it would be good to check the PG DOCs to get easy answers 
like this. Steps:
1. google it: Postgresql alter role
2. Choose the one that points to the official pg docs. 
https://www.postgresql.org/docs/9.0/sql-alterrole.html
3. Change the version at top of the page to your PG version.

Now on this page it explicitly shows you the syntax for changing 
password expiration: |VALID UNTIL|'/|timestamp|/'
Then the same page gives 2 working examples:

Change a password expiration date, specifying that the password should 
expire at midday on 4th May 2015 using the time zone which is one hour 
ahead ofUTC:

ALTER ROLE chris VALID UNTIL 'May 4 12:00:00 2015 +1';

Make a password valid forever:

ALTER ROLE fred VALID UNTIL 'infinity';


Please do a little research before submitting questions.  We love to 
answer questions but it would be nice if you could do a little effort on 
your own in advance first.

Regards,
Michael Vitale


Pepe TD Vo wrote on 8/2/2019 8:06 AM:
> I want to know too.
>
> I couldn't find the profile setting in Postgres as Oracle and all I do is
> "ALTER ROLE '${USER}' WITH PASSWORD '${password}' VALID UNTIL 
> '${expiration_timestamp}';
>
> thank you.
>
> **
> *Bach-Nga
>
> *No one in this world is pure and perfect.  If you avoid people for 
> their mistakes you will be alone. So judge less, love and forgive more.
> To call him a dog hardly seems to do him justice though in as much as 
> he had four legs, a tail, and barked, I admit he was, to all outward 
> appearances. But to those who knew him well, he was a perfect 
> gentleman (Hermione Gingold)
>
> **Live simply **Love generously **Care deeply **Speak kindly.
> *** Genuinely rich *** Faithful talent *** Sharing success
>
>
> On Friday, August 2, 2019, 07:26:23 AM EDT, Dhandapani Shanmugam 
> <postgresql95@gmail.com> wrote:
>
>
> Hey,
>
> I would like to know, do we have profile concept in PostgreSQL as like 
> in Oracle.
> I have a requirement to expire user password in 90 days and in oracle, 
> I can achieve this by creating profile with custom requirements and 
> assign it to the users.  Similarly in PostgreSQL do we have options to 
> restrict the users on password complexity.
>
> -D

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

* Re: Profile setup in PostgreSQL
@ 2019-08-02 13:10  Pepe TD Vo <pepevo@yahoo.com>
  parent: MichaelDBA <MichaelDBA@sqlexec.com>
  2 siblings, 0 replies; 6+ messages in thread

From: Pepe TD Vo @ 2019-08-02 13:10 UTC (permalink / raw)
  To: MichaelDBA <MichaelDBA@sqlexec.com>; +Cc: pgsql-admin; Dhandapani Shanmugam <postgresql95@gmail.com>

I did "alter role" as same the syntax you sent.  I thought there's a profile setting like Oracle, pw_limit, password_life_time, password_reuse_time, etc... and on mysql we can set on my.cnf.  Seem like postgres doesn't have this function.
thank you.

Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success 

    On Friday, August 2, 2019, 08:42:47 AM EDT, MichaelDBA <MichaelDBA@sqlexec.com> wrote:  
 
 First of all, it would be good to check the PG DOCs to get easy answers like this. Steps:
1. google it: Postgresql alter role
2. Choose the one that points to the official pg docs. https://www.postgresql.org/docs/9.0/sql-alterrole.html
3. Change the version at top of the page to your PG version.

Now on this page it explicitly shows you the syntax for changing password expiration: VALID UNTIL 'timestamp'
Then the same page gives 2 working examples:


Change a password expiration date, specifying that the password should expire at midday on 4th May 2015 using the time zone which is one hour ahead of  UTC :
ALTER ROLE chris VALID UNTIL 'May 4 12:00:00 2015 +1';

Make a password valid forever:
ALTER ROLE fred VALID UNTIL 'infinity';
Please do a little research before submitting questions.  We love to answer questions but it would be nice if you could do a little effort on your own in advance first.

Regards,
Michael Vitale


Pepe TD Vo wrote on 8/2/2019 8:06 AM:

 
I want to know too.
I couldn't find the profile setting in Postgres as Oracle and all I do is "ALTER ROLE '${USER}' WITH PASSWORD '${password}' VALID UNTIL '${expiration_timestamp}';
thank you.
Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success 

     On Friday, August 2, 2019, 07:26:23 AM EDT, Dhandapani Shanmugam <postgresql95@gmail.com> wrote:  
 
 Hey,
I would like to know, do we have profile concept in PostgreSQL as like in Oracle.I have a requirement to expire user password in 90 days and in oracle, I can achieve this by creating profile with custom requirements and assign it to the users.  Similarly in PostgreSQL do we have options to restrict the users on password complexity. 
-D  
  

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

* Re: Profile setup in PostgreSQL
@ 2019-08-02 13:14  Avin Kavish <avinkavish@gmail.com>
  parent: MichaelDBA <MichaelDBA@sqlexec.com>
  2 siblings, 0 replies; 6+ messages in thread

From: Avin Kavish @ 2019-08-02 13:14 UTC (permalink / raw)
  To: Dhandapani Shanmugam <postgresql95@gmail.com>; +Cc: pgsql-admin

>
> Similarly in PostgreSQL do we have options to restrict the users on
> password complexity.


According to the docs,  there is a module called passwordcheck that will
check the password,

https://www.postgresql.org/docs/9.0/passwordcheck.html

https://paquier.xyz/postgresql-2/postgres-module-highlight-customize-passwordcheck-to-secure-your-da...

On Fri, Aug 2, 2019 at 6:12 PM MichaelDBA <MichaelDBA@sqlexec.com> wrote:

> First of all, it would be good to check the PG DOCs to get easy answers
> like this. Steps:
> 1. google it: Postgresql alter role
> 2. Choose the one that points to the official pg docs.
> https://www.postgresql.org/docs/9.0/sql-alterrole.html
> 3. Change the version at top of the page to your PG version.
>
> Now on this page it explicitly shows you the syntax for changing password
> expiration: VALID UNTIL '*timestamp*'
> Then the same page gives 2 working examples:
>
> Change a password expiration date, specifying that the password should
> expire at midday on 4th May 2015 using the time zone which is one hour
> ahead of UTC:
>
> ALTER ROLE chris VALID UNTIL 'May 4 12:00:00 2015 +1';
>
> Make a password valid forever:
>
> ALTER ROLE fred VALID UNTIL 'infinity';
>
>
> Please do a little research before submitting questions.  We love to
> answer questions but it would be nice if you could do a little effort on
> your own in advance first.
>
> Regards,
> Michael Vitale
>
>
> Pepe TD Vo wrote on 8/2/2019 8:06 AM:
>
> I want to know too.
>
> I couldn't find the profile setting in Postgres as Oracle and all I do is
> "ALTER ROLE '${USER}' WITH PASSWORD '${password}' VALID UNTIL
> '${expiration_timestamp}';
>
> thank you.
>
>
>
> *Bach-Nga*No one in this world is pure and perfect.  If you avoid people
> for their mistakes you will be alone. So judge less, love and forgive more.
> To call him a dog hardly seems to do him justice though in as much as he
> had four legs, a tail, and barked, I admit he was, to all outward
> appearances. But to those who knew him well, he was a perfect gentleman
> (Hermione Gingold)
>
> **Live simply **Love generously **Care deeply **Speak kindly.
> *** Genuinely rich *** Faithful talent *** Sharing success
>
>
> On Friday, August 2, 2019, 07:26:23 AM EDT, Dhandapani Shanmugam
> <postgresql95@gmail.com> <postgresql95@gmail.com> wrote:
>
>
> Hey,
>
> I would like to know, do we have profile concept in PostgreSQL as like in
> Oracle.
> I have a requirement to expire user password in 90 days and in oracle, I
> can achieve this by creating profile with custom requirements and assign it
> to the users.  Similarly in PostgreSQL do we have options to restrict the
> users on password complexity.
>
> -D
>
>
>

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

* Re: Profile setup in PostgreSQL
@ 2019-08-02 17:15  Dhandapani Shanmugam <postgresql95@gmail.com>
  parent: MichaelDBA <MichaelDBA@sqlexec.com>
  2 siblings, 0 replies; 6+ messages in thread

From: Dhandapani Shanmugam @ 2019-08-02 17:15 UTC (permalink / raw)
  To: MichaelDBA <MichaelDBA@sqlexec.com>; +Cc: Pepe TD Vo <pepevo@yahoo.com>; pgsql-admin

Thanks for your response. I am aware of the setting "VALID UNTIL", it is
specific for each users.  However I'm looking for profile setting like
oracle, pw_limit, password_life_time,expire_time, password_reuse_time etc
which can be set on a profile and that can be assigned to custom users.

-D

On Fri, Aug 2, 2019 at 6:12 PM MichaelDBA <MichaelDBA@sqlexec.com> wrote:

> First of all, it would be good to check the PG DOCs to get easy answers
> like this. Steps:
> 1. google it: Postgresql alter role
> 2. Choose the one that points to the official pg docs.
> https://www.postgresql.org/docs/9.0/sql-alterrole.html
> 3. Change the version at top of the page to your PG version.
>
> Now on this page it explicitly shows you the syntax for changing password
> expiration: VALID UNTIL '*timestamp*'
> Then the same page gives 2 working examples:
>
> Change a password expiration date, specifying that the password should
> expire at midday on 4th May 2015 using the time zone which is one hour
> ahead of UTC:
>
> ALTER ROLE chris VALID UNTIL 'May 4 12:00:00 2015 +1';
>
> Make a password valid forever:
>
> ALTER ROLE fred VALID UNTIL 'infinity';
>
>
> Please do a little research before submitting questions.  We love to
> answer questions but it would be nice if you could do a little effort on
> your own in advance first.
>
> Regards,
> Michael Vitale
>
>
> Pepe TD Vo wrote on 8/2/2019 8:06 AM:
>
> I want to know too.
>
> I couldn't find the profile setting in Postgres as Oracle and all I do is
> "ALTER ROLE '${USER}' WITH PASSWORD '${password}' VALID UNTIL
> '${expiration_timestamp}';
>
> thank you.
>
>
>
> *Bach-Nga*No one in this world is pure and perfect.  If you avoid people
> for their mistakes you will be alone. So judge less, love and forgive more.
> To call him a dog hardly seems to do him justice though in as much as he
> had four legs, a tail, and barked, I admit he was, to all outward
> appearances. But to those who knew him well, he was a perfect gentleman
> (Hermione Gingold)
>
> **Live simply **Love generously **Care deeply **Speak kindly.
> *** Genuinely rich *** Faithful talent *** Sharing success
>
>
> On Friday, August 2, 2019, 07:26:23 AM EDT, Dhandapani Shanmugam
> <postgresql95@gmail.com> <postgresql95@gmail.com> wrote:
>
>
> Hey,
>
> I would like to know, do we have profile concept in PostgreSQL as like in
> Oracle.
> I have a requirement to expire user password in 90 days and in oracle, I
> can achieve this by creating profile with custom requirements and assign it
> to the users.  Similarly in PostgreSQL do we have options to restrict the
> users on password complexity.
>
> -D
>
>
>

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


end of thread, other threads:[~2019-08-02 17:15 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 11:25 Profile setup in PostgreSQL Dhandapani Shanmugam <postgresql95@gmail.com>
2019-08-02 12:06 ` Pepe TD Vo <pepevo@yahoo.com>
2019-08-02 12:42   ` MichaelDBA <MichaelDBA@sqlexec.com>
2019-08-02 13:10     ` Pepe TD Vo <pepevo@yahoo.com>
2019-08-02 13:14     ` Avin Kavish <avinkavish@gmail.com>
2019-08-02 17:15     ` Dhandapani Shanmugam <postgresql95@gmail.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