Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1htXK3-0002uI-4E for pgsql-admin@arkaria.postgresql.org; Fri, 02 Aug 2019 13:10:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1htXK1-0003cQ-UZ for pgsql-admin@arkaria.postgresql.org; Fri, 02 Aug 2019 13:10:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1htXK1-0003cJ-CN for pgsql-admin@lists.postgresql.org; Fri, 02 Aug 2019 13:10:13 +0000 Received: from sonic305-2.consmr.mail.bf2.yahoo.com ([74.6.133.41]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1htXJx-0003ot-HI for pgsql-admin@postgresql.org; Fri, 02 Aug 2019 13:10:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1564751404; bh=wJ+CTp+AUF3RnYD2HeU3DsaevGQGDSRa2IIbvDg9zFk=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=PjCOhIfD93quYOQ13aLiH5eQ0A85Dbihu0fLQO7q40h8+j5jnmVPUnnuLP1+Vm6cqgNGV7+8wuexiApK6aFCRMG9YAi625aMWqp9IMO1FgFIOkdP2wp+RNYgdCzV7Ktpt//0aX6jhTH5CKLeciwntfooWwfV7ldO5TglOkYEmdQYFQiPWrY3XSwIwKDCE2HtOrWNcfin+3BcLwQxkIbA6R3XM0UOJCnpcpvfTCs9TIsSaMEH0YTBfS7T9EHAWP+35t5jcNLpAZr+wSdnHNxERNzg8rSRs0k1a6isiCDPWbu8N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p9tkWPGbXZRqOdsx7d2hzR4iuSKjK.X1UUupWJ 1PLJvqHHN717pOMPP426bSvnjJRQAnig7SH6AJ6BAVzEsd0u34sE759T59mBS_BT6q8DMbR4yO3G 0QEvLS1rly.oEWZnbdWX5OPEqSzUpC0WZfD9eFvl5ISedaUyPQQiFhKZPTGp7dSvCTpQIpsQKd_y jUGDdQJnJK0v..pZWs72I93Jvr84MOBWqrNOM5DDuBUPMjmrjjdwqYCFW.x3oDHM9K.RZeUSVEyP 8DyL0GfZsQGq60Pbb27yBkmIIWwwFG6vwpXTHDt0- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.bf2.yahoo.com with HTTP; Fri, 2 Aug 2019 13:10:04 +0000 Date: Fri, 2 Aug 2019 13:10:03 +0000 (UTC) From: Pepe TD Vo Reply-To: Pepe TD Vo To: MichaelDBA Cc: pgsql-admin , Dhandapani Shanmugam Message-ID: <773306536.440182.1564751403489@mail.yahoo.com> In-Reply-To: <3601faa4-f3c4-b82a-2d50-ad947205c94b@sqlexec.com> References: <1498461632.407898.1564747593002@mail.yahoo.com> <3601faa4-f3c4-b82a-2d50-ad947205c94b@sqlexec.com> Subject: Re: Profile setup in PostgreSQL MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_440181_1090063587.1564751403487" X-Mailer: WebService/1.1.14097 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36 Content-Length: 15680 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_440181_1090063587.1564751403487 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I did "alter role" as same the syntax you sent.=C2=A0 I thought there's a p= rofile setting like Oracle, pw_limit, password_life_time, password_reuse_ti= me, etc... and on mysql we can set on my.cnf.=C2=A0 Seem like postgres does= n't have this function. thank you. Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir 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 t= o 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=20 On Friday, August 2, 2019, 08:42:47 AM EDT, MichaelDBA wrote: =20 =20 First of all, it would be good to check the PG DOCs to get easy answers li= ke this. Steps: 1. google it: Postgresql alter role 2. Choose the one that points to the official pg docs. https://www.postgres= ql.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 e= xpiration: VALID UNTIL=C2=A0'timestamp' Then the same page gives 2 working examples: Change a password expiration date, specifying that the password should expi= re at midday on 4th May 2015 using the time zone which is one hour ahead of= =C2=A0 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.=C2=A0 We love to a= nswer questions but it would be nice if you could do a little effort on you= r own in advance first. Regards, Michael Vitale Pepe TD Vo wrote on 8/2/2019 8:06 AM: =20 I want to know too. I couldn't find the profile setting in Postgres as Oracle and all I do is= =C2=A0"ALTER ROLE '${USER}' WITH PASSWORD '${password}' VALID UNTIL '${expi= ration_timestamp}'; thank you. Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir 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 t= o 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=20 On Friday, August 2, 2019, 07:26:23 AM EDT, Dhandapani Shanmugam wrote: =20 =20 Hey, I would like to know, do we have profile concept in PostgreSQL as like in O= racle.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 assig= n it to the users.=C2=A0 Similarly in PostgreSQL do we have options to rest= rict the users on password complexity.=C2=A0 -D =20 =20 ------=_Part_440181_1090063587.1564751403487 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I did "alter role" as same the syntax you = sent.  I thought there's a profile setting like Oracle, pw_limit, pass= word_life_time, password_reuse_time, etc... and on mysql we can set on my.c= nf.  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, lo= ve and forgive more.
To call him a dog h= ardly 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)<= /font>

**Live simply **Love g= enerously **Care deeply **Speak kindly.
**= * Genuinely rich *** Faithful talent *** Sharing success


=20
=20
On Friday, August 2, 2019, 08:42:47 AM EDT, MichaelDBA = <MichaelDBA@sqlexec.com> wrote:


First of all, it would = be=20 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.htm= l
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=20 password expiration: VALID=20 UNTIL = 'timestamp'
Then the same page gives 2 working examples:

Change a password expiration date, specifying that the password should expire=20 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 V=
ALID UNTIL 'infinity';

Please do a little research before submitting questions.  We love to= =20 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=20 couldn't find the profile setting in Postgres as Oracle and all I do is&nbs= p;
"ALTER ROLE '${USER}' WITH PASSWORD=20 '${password}' VALID UNTIL '${expiration_timestamp}';
=
thank=20 you.

Bach-Nga

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


=20
=20
On Friday, August 2, 2019, 07:26:23 AM EDT,=20 Dhandapani Shanmugam <postgresql95@gmail.c= om> 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=20 days and in oracle, I can achieve this by creating profile with custom=20 requirements and assign it to the users.  Similarly in PostgreSQL do w= e=20 have options to restrict the users on password complexity. 
=
-D

------=_Part_440181_1090063587.1564751403487--