[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: Profile setup in PostgreSQL
From:       Dhandapani Shanmugam <postgresql95 () gmail ! com>
Date:       2019-08-02 17:27:27
Message-ID: CAAj4MFFf2gVMgfkzu0vRkgPSp8qMpLkWxBmZc0eAhfz4W4hT=A () mail ! gmail ! com
[Download RAW message or body]

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
>
>
>

[Attachment #3 (text/html)]

<div dir="ltr">Thanks for your response. I am aware of the setting &quot;VALID \
UNTIL&quot;, it is specific for each users.   However I&#39;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.  \
<div><br></div><div>-D</div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Fri, Aug 2, 2019 at 6:12 PM MichaelDBA &lt;<a \
href="mailto:MichaelDBA@sqlexec.com">MichaelDBA@sqlexec.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div bgcolor="#FFFFFF">First of all, it would be 
good to check the PG DOCs to get easy answers like this. Steps:<br>
1. google it: Postgresql alter role<br>
2. Choose the one that points to the official pg docs. <a \
href="https://www.postgresql.org/docs/9.0/sql-alterrole.html" \
target="_blank">https://www.postgresql.org/docs/9.0/sql-alterrole.html</a><br> 3. \
Change the version at top of the page to your PG version.<br> <br>
Now on this page it explicitly shows you the syntax for changing 
password expiration: <code class="gmail-m_4720782882777321812literal" \
style="box-sizing:border-box;font-family:monospace,monospace;font-size:14.4px;color:rgb(13,10,11);word-break:break-word;border-radius:0.25rem;margin:0.6rem \
0px;font-weight:300;font-style:normal;font-variant-ligatures:normal;font-variant-caps: \
normal;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white \
-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(248,249,250)">VALID \
 UNTIL</code><span><span>  </span>&#39;</span><em \
class="gmail-m_4720782882777321812replaceable" \
style="box-sizing:border-box;font-style:italic;font-weight:900;color:rgb(13,10,11);fon \
t-family:monospace;font-size:14.4px;font-variant-ligatures:normal;font-variant-caps:no \
rmal;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-s \
pace:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><code \
style="box-sizing:border-box;font-family:monospace,monospace;font-size:1em;word-break:break-word;border-radius:0.25rem;margin:0.6rem \
0px;font-weight:900;color:inherit;background-color:rgb(248,249,250)">timestamp</code></em><span \
style="color:rgb(13,10,11);font-family:monospace;font-size:14.4px;font-style:normal;fo \
nt-variant-ligatures:normal;font-variant-caps:normal;font-weight:300;letter-spacing:no \
rmal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spaci \
ng:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">&#39;<br>
 Then the same page gives 2 working examples:<br>
</span><br>
<p style="box-sizing:border-box;margin-top:0px;color:rgb(13,10,11);font-family:&quot;Open \
Sans&quot;,sans-serif;font-size:14.4px;font-style:normal;font-variant-ligatures:normal \
;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-i \
ndent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb \
(255,255,255);text-decoration-style:initial;text-decoration-color:initial;margin-bottom:1rem">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<span>  \
</span><acronym class="gmail-m_4720782882777321812acronym" \
style="box-sizing:border-box">UTC</acronym>:</p> <pre \
class="gmail-m_4720782882777321812programlisting" \
style="box-sizing:border-box;font-family:monospace,monospace;font-size:14.4px;overflow \
:auto;display:block;color:rgb(13,10,11);border-radius:0.25rem;font-weight:300;border:1px \
solid rgb(206,212,218);font-style:normal;font-variant-ligatures:normal;font-variant-ca \
ps:normal;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;wo \
rd-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;margin:1rem \
0px;background-color:rgb(248,249,250);padding:0.8rem">ALTER ROLE chris VALID UNTIL \
&#39;May 4 12:00:00 2015 +1&#39;; </pre>
<p style="box-sizing:border-box;margin-top:0px;color:rgb(13,10,11);font-family:&quot;Open \
Sans&quot;,sans-serif;font-size:14.4px;font-style:normal;font-variant-ligatures:normal \
;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-i \
ndent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb \
(255,255,255);text-decoration-style:initial;text-decoration-color:initial;margin-bottom:1rem">Make
  a password valid forever:</p>
<pre class="gmail-m_4720782882777321812programlisting" \
style="box-sizing:border-box;font-family:monospace,monospace;font-size:14.4px;overflow \
:auto;display:block;color:rgb(13,10,11);border-radius:0.25rem;font-weight:300;border:1px \
solid rgb(206,212,218);font-style:normal;font-variant-ligatures:normal;font-variant-ca \
ps:normal;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;wo \
rd-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;margin:1rem \
0px;background-color:rgb(248,249,250);padding:0.8rem">ALTER ROLE fred VALID UNTIL \
&#39;infinity&#39;;</pre> <span></span><br>
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.<br>
<br>
Regards,<br>
Michael Vitale<br>
<br>
<br>
<span>Pepe TD Vo wrote on 8/2/2019 8:06 AM:</span><br>
<blockquote type="cite">
  
  <div class="gmail-m_4720782882777321812ydpd622b5bfyahoo-style-wrap" \
style="font-family:verdana,helvetica,sans-serif;font-size:16px"><div><div dir="ltr">I \
want to know too.</div><div dir="ltr"><br></div><div dir="ltr">I  couldn&#39;t find \
the profile setting in Postgres as Oracle and all I do is  </div><div \
dir="ltr">&quot;ALTER ROLE &#39;${USER}&#39; WITH PASSWORD  &#39;${password}&#39; \
VALID UNTIL &#39;${expiration_timestamp}&#39;;</div><div dir="ltr"><br></div><div \
dir="ltr">thank  you.</div><div dir="ltr"><br></div><div \
class="gmail-m_4720782882777321812ydpd622b5bfsignature"><div \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_1_1381789421038_7868" \
class="gmail-m_4720782882777321812ydpd622b5bfyiv3811552299ms__id13889"><font \
color="#0000ff"><b><span \
class="gmail-m_4720782882777321812ydpd622b5bfyiv3811552299sg"></span></b></font><div \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_1_1381789421038_7874" \
class="gmail-m_4720782882777321812ydpd622b5bfyiv3811552299ms__id13893"><font \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_1_1381789421038_7873" \
color="#0000ff"><span \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_1_1381789421038_7871" \
class="gmail-m_4720782882777321812ydpd622b5bfyiv3811552299sg"><font \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_1_1381789421038_7870" \
style="background-color:inherit" color="#8000ff"><b \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_16_1381789421038_18">Bach-Nga<br \
clear="none"><br clear="none"></b>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.</font></span></font></div><div \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_1_1381789421038_7874" \
class="gmail-m_4720782882777321812ydpd622b5bfyiv3811552299ms__id13893"><font \
color="#0000ff"><span \
class="gmail-m_4720782882777321812ydpd622b5bfyiv3811552299sg"><font \
style="background-color:inherit" color="#8000ff">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)</font></span></font></div><br \
clear="none"><span style="color:rgb(128,0,255)" \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_1_1381789421038_7867">**Live \
                simply 
**Love generously **Care deeply **Speak kindly.</span></div><div \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_1_1381789421038_7866" \
class="gmail-m_4720782882777321812ydpd622b5bfyiv3811552299ms__id13894"><span \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_1_1381789421038_7865" \
class="gmail-m_4720782882777321812ydpd622b5bfyiv3811552299sg"><font \
id="gmail-m_4720782882777321812ydpd622b5bfyui_3_13_0_rc_1_1_1381789421038_7864" \
                style="background-color:inherit" color="#8000ff">*** Genuinely rich 
*** Faithful talent *** Sharing success</font></span></div></div></div>
        <div><br></div><div><br></div>
        
        </div>
  <div id="gmail-m_4720782882777321812yahoo_quoted_4900802219" \
                class="gmail-m_4720782882777321812yahoo_quoted">
            <div style="font-family:&quot;Helvetica \
Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">  
                <div>
                    On Friday, August 2, 2019, 07:26:23 AM EDT, 
Dhandapani Shanmugam <a class="gmail-m_4720782882777321812moz-txt-link-rfc2396E" \
href="mailto:postgresql95@gmail.com" \
target="_blank">&lt;postgresql95@gmail.com&gt;</a> wrote:  </div>
                <div><br></div>
                <div><br></div>
                <div><div id="gmail-m_4720782882777321812yiv9040866062"><div \
dir="ltr">Hey,<div><br></div><div>I  would like to know, do we have profile concept \
in PostgreSQL as like in  Oracle.</div><div>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.  \
</div><div><br></div><div>-D</div></div></div></div>  </div>
        </div>
</blockquote>
<br>
</div>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic