<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need to get password Attributes in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794553#M392034</link>
    <description>&lt;!--!*#--&gt;Or you could reject the comment lines by using:&lt;BR /&gt;&lt;BR /&gt; phd=` grep ^PASSWORD_HISTORY_DEPTH /etc/default/security ...&lt;BR /&gt;&lt;BR /&gt;thus anchoring the expression to the beginning of the line. ("man 5 regexp" if you need further info).&lt;BR /&gt;&lt;BR /&gt;-db&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 03 Jun 2011 14:45:34 GMT</pubDate>
    <dc:creator>Dan Bolton</dc:creator>
    <dc:date>2011-06-03T14:45:34Z</dc:date>
    <item>
      <title>Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794544#M392025</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;Kindly help me how to get the followin following attributes through a command.&lt;BR /&gt;I can understand that I can view them in /etc/default/security file. But I need to find them through command.&lt;BR /&gt;&lt;BR /&gt;PASSWORD_HISTORY_DEPTH&lt;BR /&gt;ABORT_LOGIN_ON_MISSING_HOMEDIR&lt;BR /&gt;MIN_PASSWORD_LENGTH&lt;BR /&gt;PASSWORD_MIN_UPPER_CASE_CHARS&lt;BR /&gt;PASSWORD_MIN_DIGIT_CHARS&lt;BR /&gt;PASSWORD_MIN_SPECIAL_CHARS&lt;BR /&gt;PASSWORD_MAXDAYS&lt;BR /&gt;PASSWORD_MINDAYS&lt;BR /&gt;PASSWORD_WARNDAYS&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance!!!</description>
      <pubDate>Thu, 02 Jun 2011 02:07:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794544#M392025</guid>
      <dc:creator>Vidhya B</dc:creator>
      <dc:date>2011-06-02T02:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794545#M392026</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] But I need to find them through&lt;BR /&gt;&amp;gt; command.&lt;BR /&gt;&lt;BR /&gt;      cat /etc/default/security&lt;BR /&gt;&lt;BR /&gt;What, exactly, do you mean?  What, exactly,&lt;BR /&gt;does "find them through command" mean to you?&lt;BR /&gt;What, exactly, would you like to do?&lt;BR /&gt;&lt;BR /&gt;      grep PASSWORD_HISTORY_DEPTH /etc/default/security&lt;BR /&gt;&lt;BR /&gt;There it is.  Now what?</description>
      <pubDate>Thu, 02 Jun 2011 02:31:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794545#M392026</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-06-02T02:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794546#M392027</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I can understand that I can grep.&lt;BR /&gt;&lt;BR /&gt;I am writing a script to review hardening policies.&lt;BR /&gt;If I grep from that file and then compare values, it will make it length.&lt;BR /&gt;&lt;BR /&gt;In order to find the umask, we will use the command umask. In the similar way if there is any specific command(s) which gives me the output for the above attributes.&lt;BR /&gt;&lt;BR /&gt;For eg regarding PASSWORD_HISTORY_DEPTH, If my PASSWORD_HISTORY_DEPTH is 5, then if I am able to get a command which gives me this value directly, I will be able to assign it to a variable and compare with the actual hardening policy.&lt;BR /&gt;This will reduce time and length of the script.&lt;BR /&gt;&lt;BR /&gt;Please help.</description>
      <pubDate>Thu, 02 Jun 2011 02:47:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794546#M392027</guid>
      <dc:creator>Vidhya B</dc:creator>
      <dc:date>2011-06-02T02:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794547#M392028</link>
      <description>&lt;!--!*#--&gt;&amp;gt; I am writing a script [...]&lt;BR /&gt;&lt;BR /&gt;Should I have known that?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] assign it to a variable [...]&lt;BR /&gt;&lt;BR /&gt;Should I have known that?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I can understand that I can grep.&lt;BR /&gt;&lt;BR /&gt;That's good, but you seem to need to learn&lt;BR /&gt;some shell script basics.  For example, ``&lt;BR /&gt;or $() can be used to work with the output of&lt;BR /&gt;a command (or pipeline).&lt;BR /&gt;&lt;BR /&gt;phd=` grep PASSWORD_HISTORY_DEPTH \&lt;BR /&gt; /etc/default/security | \&lt;BR /&gt; sed -e 's/.*=//' `&lt;BR /&gt;&lt;BR /&gt;echo $phd&lt;BR /&gt;&lt;BR /&gt;Interactively:&lt;BR /&gt;&lt;BR /&gt;dyi # phd=` grep PASSWORD_HISTORY_DEPTH \&lt;BR /&gt;&amp;gt;  /etc/default/security | \&lt;BR /&gt;&amp;gt;  sed -e 's/.*=//' `&lt;BR /&gt;&lt;BR /&gt;dyi # echo $phd&lt;BR /&gt;4</description>
      <pubDate>Thu, 02 Jun 2011 03:20:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794547#M392028</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-06-02T03:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794548#M392029</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Actually I have another issue even.&lt;BR /&gt;&lt;BR /&gt;There are few entries in that file which is already commented.&lt;BR /&gt;&lt;BR /&gt;So If two PASSWORD_HISTORY_DEPTH(one commented) exist in the file, then that will cause problem again.&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Jun 2011 04:10:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794548#M392029</guid>
      <dc:creator>Vidhya B</dc:creator>
      <dc:date>2011-06-02T04:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794549#M392030</link>
      <description>So further judicious use of the sed command should get rid of any comment lines (and blank lines):&lt;BR /&gt;&lt;BR /&gt;SO you had:&lt;BR /&gt;&lt;BR /&gt;phd=` grep PASSWORD_HISTORY_DEPTH \&lt;BR /&gt;/etc/default/security | \&lt;BR /&gt;sed -e 's/.*=//' `&lt;BR /&gt;&lt;BR /&gt;echo $phd&lt;BR /&gt;&lt;BR /&gt;That could become:&lt;BR /&gt;&lt;BR /&gt;phd=` sed -e 's/#.*//g' -e '/^$/d' \&lt;BR /&gt; /etc/default/security  | \&lt;BR /&gt;grep PASSWORD_HISTORY_DEPTH | \&lt;BR /&gt;sed -e 's/.*=//' `&lt;BR /&gt;&lt;BR /&gt;echo $phd&lt;BR /&gt;&lt;BR /&gt;You could probably make this more efficient by combining those sed calls into one, but I've left them seperate so you can get a feel for what is happening here...&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Thu, 02 Jun 2011 05:57:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794549#M392030</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2011-06-02T05:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794550#M392031</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] (and blank lines):&lt;BR /&gt;&lt;BR /&gt;How easy is it to find a blank line which&lt;BR /&gt;also has the desired keyword on it?</description>
      <pubDate>Thu, 02 Jun 2011 15:06:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794550#M392031</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-06-02T15:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794551#M392032</link>
      <description>&amp;gt;&amp;gt; How easy is it to find a blank line which&lt;BR /&gt;&amp;gt;&amp;gt; also has the desired keyword on it?&lt;BR /&gt;&lt;BR /&gt;Ha! I take your point - I guess I was using it out of context - I'm in the habit of always putting those two sed constructs together as I'm ass-u-me(ing) the output will be read by a person rather than another command in a pipeline... &lt;BR /&gt;&lt;BR /&gt;for example... I don't like the output of:&lt;BR /&gt;&lt;BR /&gt;swlist -l fileset -a state&lt;BR /&gt;&lt;BR /&gt;I much prefer to look at :&lt;BR /&gt;&lt;BR /&gt;swlist -l fileset -a state | sed -e 's/#.*//g' -e '/^$/d'&lt;BR /&gt;&lt;BR /&gt;So I left it in in this case cos I thought the original poster might be curious enough to deconstruct the pipeline, and it would show him a cleaner output...&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Thu, 02 Jun 2011 16:39:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794551#M392032</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2011-06-02T16:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794552#M392033</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] I thought the original poster might&lt;BR /&gt;&amp;gt; be curious enough [...]&lt;BR /&gt;&lt;BR /&gt;I wish, but there's not much evidence for it.</description>
      <pubDate>Thu, 02 Jun 2011 20:13:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794552#M392033</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-06-02T20:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794553#M392034</link>
      <description>&lt;!--!*#--&gt;Or you could reject the comment lines by using:&lt;BR /&gt;&lt;BR /&gt; phd=` grep ^PASSWORD_HISTORY_DEPTH /etc/default/security ...&lt;BR /&gt;&lt;BR /&gt;thus anchoring the expression to the beginning of the line. ("man 5 regexp" if you need further info).&lt;BR /&gt;&lt;BR /&gt;-db&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Jun 2011 14:45:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794553#M392034</guid>
      <dc:creator>Dan Bolton</dc:creator>
      <dc:date>2011-06-03T14:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794554#M392035</link>
      <description>Dan,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; phd=` grep ^PASSWORD_HISTORY_DEPTH /etc/default/security ...&lt;BR /&gt;&lt;BR /&gt;Fine, except there is no actual requirement for the keyword to appear in column 1 , or even for a comment line to have a "#" in column 1 of the file, so there could be some white space in there... maybe:&lt;BR /&gt;&lt;BR /&gt;phd=$( grep "^[[:space:]]*PASSWORD_HISTORY_DEPTH=" /etc/default/security | sed -e 's/.*=//' )&lt;BR /&gt;&lt;BR /&gt;All goes to show there are many ways to do this, and each way requires you to think carefully about the input...&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Mon, 06 Jun 2011 06:28:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794554#M392035</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2011-06-06T06:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need to get password Attributes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794555#M392036</link>
      <description>Hi Vidhya B,&lt;BR /&gt;&lt;BR /&gt;for ur query i guess u want to write a script to get the said parmeters.&lt;BR /&gt;&lt;BR /&gt;R u ware of the command "logins -aox"&lt;BR /&gt;&lt;BR /&gt;Please check its man page even this command give the output of all the users with, last passwd reset, PASSWORD_MAXDAYS&lt;BR /&gt;PASSWORD_MINDAYS&lt;BR /&gt;PASSWORD_WARNDAYS&lt;BR /&gt;&lt;BR /&gt;and many more check its man page for more details.&lt;BR /&gt;&lt;BR /&gt;Hope this solves ur query.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Vishnu Khandare</description>
      <pubDate>Tue, 07 Jun 2011 10:53:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-get-password-attributes/m-p/4794555#M392036</guid>
      <dc:creator>vishnu.khandare</dc:creator>
      <dc:date>2011-06-07T10:53:30Z</dc:date>
    </item>
  </channel>
</rss>

