<?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 password aging using a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528178#M890102</link>
    <description>Greetings,  looking for a script (or script pointers) to enable password aging.  In the script I would like to set the min time between password aging to 2 and the max time between password aging to 12.  Thankyou for your help(s)!&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 14 May 2001 19:08:02 GMT</pubDate>
    <dc:creator>wvsa</dc:creator>
    <dc:date>2001-05-14T19:08:02Z</dc:date>
    <item>
      <title>password aging using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528178#M890102</link>
      <description>Greetings,  looking for a script (or script pointers) to enable password aging.  In the script I would like to set the min time between password aging to 2 and the max time between password aging to 12.  Thankyou for your help(s)!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 May 2001 19:08:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528178#M890102</guid>
      <dc:creator>wvsa</dc:creator>
      <dc:date>2001-05-14T19:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: password aging using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528179#M890103</link>
      <description>You can use SAM to accomplish this. Modify the users account and go into the password options and there is an aging option. This might be the easiest way to go. But if you really want to do aging by a script, set one user up for aging and look at the sam log. This should give you the commands to set up agin.</description>
      <pubDate>Mon, 14 May 2001 19:30:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528179#M890103</guid>
      <dc:creator>Jim Moffitt_1</dc:creator>
      <dc:date>2001-05-14T19:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: password aging using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528180#M890104</link>
      <description>sbin/cat /etc/passwd | awk -F: '{print $1}'&amp;gt; /tmp/pass2change&lt;BR /&gt;&lt;BR /&gt;for user in `/sbin/cat /tmp/pass2change`&lt;BR /&gt;do&lt;BR /&gt;/sbin/passwd -f -x 42 -n 35  $user&lt;BR /&gt;echo "changing expiration time for $user to 45 days"&lt;BR /&gt;done&lt;BR /&gt;rm /tmp/pass2change&lt;BR /&gt;-f is force at next login&lt;BR /&gt;-x is max days before have to change&lt;BR /&gt;-n is max days between changes&lt;BR /&gt;see man passwd for other options</description>
      <pubDate>Mon, 14 May 2001 19:34:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528180#M890104</guid>
      <dc:creator>Kevin Wright</dc:creator>
      <dc:date>2001-05-14T19:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: password aging using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528181#M890105</link>
      <description>Hi,&lt;BR /&gt;I had a shell script which invokes an awk script which was already very close; I modified it for your values and also it does not alter passwd's for users with uid &amp;lt; MIN_UID. You will need to set that value. NOTE: the actual passwd call is commented out so that you can test first. Please see the attachment.&lt;BR /&gt;&lt;BR /&gt;Enjoy, Clay</description>
      <pubDate>Mon, 14 May 2001 19:37:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528181#M890105</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-14T19:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: password aging using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528182#M890106</link>
      <description>Sorry guys,&lt;BR /&gt;One small change.&lt;BR /&gt;Change the line passwd -x ${PW_MAX} -n ${PW_MIN}&lt;BR /&gt;to passwd -x ${PW_MAX} -n ${PW_MIN} ${X}&lt;BR /&gt;&lt;BR /&gt;I left off the user from the command&lt;BR /&gt;&lt;BR /&gt;Clay&lt;BR /&gt;</description>
      <pubDate>Mon, 14 May 2001 19:42:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528182#M890106</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-14T19:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: password aging using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528183#M890107</link>
      <description>I stand corrected. Kevin and Clay, great scripts! You learn something new here everyday.</description>
      <pubDate>Mon, 14 May 2001 19:53:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528183#M890107</guid>
      <dc:creator>Jim Moffitt_1</dc:creator>
      <dc:date>2001-05-14T19:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: password aging using a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528184#M890108</link>
      <description>I had to do a similar task last week - We had discovered that our Informix database was kicking people out of the database mid login with password ageing turned on so I created a script to force the password expiry in the early hours if the password was due to expire that day. You may find some bits of this useful ?&lt;BR /&gt;&lt;BR /&gt;LOGFILE=/tmp/check_passwd_log.$$ &lt;BR /&gt;EXPIRE=30&lt;BR /&gt;TODAY=$(date +%.1j)&lt;BR /&gt;YEAR=$(date +%E)&lt;BR /&gt;function NOPASS {&lt;BR /&gt;DATE=$(date +%d/%m/%y" "%H:%M) &lt;BR /&gt;echo "$DATE $USER - Password already awaiting update by user" &amp;gt;&amp;gt; $LOGFILE &lt;BR /&gt;} &lt;BR /&gt;function NOCHNG {&lt;BR /&gt;DATE=$(date +%d/%m/%y" "%H:%M)&lt;BR /&gt;echo "$DATE $USER - Password last changed $LYEXP days ago - No action" &amp;gt;&amp;gt; $LOGFILE&lt;BR /&gt;}&lt;BR /&gt;function EXPPASS { &lt;BR /&gt;DATE=$(date +%d/%m/%y" "%H:%M) &lt;BR /&gt;echo "$DATE $USER - Password last changed $LYEXP days ago - Forcing change" &amp;gt;&amp;gt; $LOGFILE &lt;BR /&gt;echo "passwd -f $USER" &amp;gt;&amp;gt; $LOGFILE &lt;BR /&gt;passwd -f $USER &lt;BR /&gt;} &lt;BR /&gt;# Exclude some users from change (alternate procedure in place) &lt;BR /&gt;for USER in $(cut -d":" -f1 /etc/passwd | egrep -v '(root|informix)') &lt;BR /&gt;do &lt;BR /&gt;EXPYEAR=$(/usr/lbin/getprpw -r -m spwchg $USER| tr -s " "|cut -d" " -f5) &lt;BR /&gt;EXPMONTH=$(/usr/lbin/getprpw -r -m spwchg $USER| tr -s " "|cut -d" " -f2) &lt;BR /&gt;EXPDAY=$(/usr/lbin/getprpw -r -m spwchg $USER| tr -s " "|cut -d" " -f3) &lt;BR /&gt;case $EXPMONTH in &lt;BR /&gt;Jan) EXPM=0;; &lt;BR /&gt;Feb) EXPM=31;; &lt;BR /&gt;Mar) EXPM=58;; &lt;BR /&gt;Apr) EXPM=89;; &lt;BR /&gt;May) EXPM=119;; &lt;BR /&gt;Jun) EXPM=150;; &lt;BR /&gt;Jul) EXPM=180;; &lt;BR /&gt;Aug) EXPM=211;; &lt;BR /&gt;Sep) EXPM=242;; &lt;BR /&gt;Oct) EXPM=272;; &lt;BR /&gt;Nov) EXPM=303;; &lt;BR /&gt;Dec) EXPM=333;; &lt;BR /&gt;*) echo $EXPMONTH invalid;exit;; &lt;BR /&gt;esac &lt;BR /&gt;if [ $EXPYEAR = "1970" ] &lt;BR /&gt;then &lt;BR /&gt;NOPASS &lt;BR /&gt;continue&lt;BR /&gt;fi &lt;BR /&gt;integer x=$EXPM y=$EXPDAY z=$EXPIRE &lt;BR /&gt;let EXP=x+y &lt;BR /&gt;if [ $EXPYEAR -lt $YEAR ] &lt;BR /&gt;then &lt;BR /&gt;# Action to perform if last update was in previous year &lt;BR /&gt;let LYEXP=365-$EXP+$TODAY &lt;BR /&gt;        if [ $LYEXP -ge $EXPIRE ] &lt;BR /&gt;        then &lt;BR /&gt;        EXPPASS &lt;BR /&gt;        else &lt;BR /&gt;        NOCHNG &lt;BR /&gt;        fi &lt;BR /&gt;else &lt;BR /&gt;# Action to perform if last update was in current year &lt;BR /&gt;let LYEXP=$TODAY-$EXP &lt;BR /&gt;        if [ $LYEXP -ge $EXPIRE ] &lt;BR /&gt;</description>
      <pubDate>Tue, 15 May 2001 08:27:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-aging-using-a-script/m-p/2528184#M890108</guid>
      <dc:creator>Nick Wickens</dc:creator>
      <dc:date>2001-05-15T08:27:04Z</dc:date>
    </item>
  </channel>
</rss>

