From: | MichaelDBA <MichaelDBA(at)sqlexec(dot)com> |
---|---|
To: | Pepe TD Vo <pepevo(at)yahoo(dot)com> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org>, Dhandapani Shanmugam <postgresql95(at)gmail(dot)com> |
Subject: | Re: Profile setup in PostgreSQL |
Date: | 2019-08-02 12:42:19 |
Message-ID: | 3601faa4-f3c4-b82a-2d50-ad947205c94b@sqlexec.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Pepe TD Vo | 2019-08-02 13:10:03 | Re: Profile setup in PostgreSQL |
Previous Message | Pepe TD Vo | 2019-08-02 12:06:32 | Re: Profile setup in PostgreSQL |