<?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: passwd -a -s in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701771#M249432</link>
    <description>Hi Tim:&lt;BR /&gt;&lt;BR /&gt;This behavior is expected.  If there is isn't any aging information, then only the name and status are returned.  This is better documented in the 11i manpages:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60127/passwd.1.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60127/passwd.1.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 03 Jan 2006 16:47:03 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2006-01-03T16:47:03Z</dc:date>
    <item>
      <title>passwd -a -s</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701769#M249430</link>
      <description>We use the above command in a perl script to send emails to users that their password is going to expire. The problem we are having is that when the command is run some of the users information is not populated by the passwd command -(examples below -small sample user gmm1018 is how they should all look)&lt;BR /&gt;&lt;BR /&gt;gmm1018  PS    12/28/05    0  90  14 &lt;BR /&gt;txp0329  PS&lt;BR /&gt;pjg0917  PS&lt;BR /&gt;abc0128  PS&lt;BR /&gt;txy1213  PS&lt;BR /&gt;&lt;BR /&gt;The users txpo0329 and below will never receive and email because those other fields are not populated. I have checked all the security setups for each user and they are identical. I also have PHCO_24189 installed.&lt;BR /&gt;&lt;BR /&gt;We are on HP-UX lawson B.11.00 U 9000/800&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Jan 2006 16:27:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701769#M249430</guid>
      <dc:creator>Tim Downs</dc:creator>
      <dc:date>2006-01-03T16:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: passwd -a -s</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701770#M249431</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You have to create for each user in his home directory file called .forward and put into it the user's mail address, e.g for txp0329: tim_downs@downs.com&lt;BR /&gt;In this case mail sent to txp will be redirected to Tim.&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Tue, 03 Jan 2006 16:42:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701770#M249431</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2006-01-03T16:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: passwd -a -s</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701771#M249432</link>
      <description>Hi Tim:&lt;BR /&gt;&lt;BR /&gt;This behavior is expected.  If there is isn't any aging information, then only the name and status are returned.  This is better documented in the 11i manpages:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60127/passwd.1.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60127/passwd.1.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 03 Jan 2006 16:47:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701771#M249432</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-01-03T16:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: passwd -a -s</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701772#M249433</link>
      <description>We do have aging information on these users because their passwords are expiring every 90 days just like everyone else. It appears to happen to the newest users that have been setup on the system (within the last 2 years). We also have this setup as a trusted system.</description>
      <pubDate>Wed, 04 Jan 2006 10:24:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701772#M249433</guid>
      <dc:creator>Tim Downs</dc:creator>
      <dc:date>2006-01-04T10:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: passwd -a -s</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701773#M249434</link>
      <description>Hi Tom,&lt;BR /&gt; &lt;BR /&gt;the way HP-UX is storing password aging information is a bit brain damaged,&lt;BR /&gt;as compared to other Unices.&lt;BR /&gt;(e.g. Solaris and Linux place that in /etc/shadow)&lt;BR /&gt; &lt;BR /&gt;To play with I temporarily assigned this account's passwd &lt;BR /&gt;  &lt;BR /&gt;$ grep saz /etc/passwd &lt;BR /&gt;saz:eM6Z04PZmIo6c,/.KR:102:20:SAZ login:/home/saz:/sbin/sh&lt;BR /&gt;  &lt;BR /&gt;As you can see, the aging info is stored within the passwd field in a string directly following a comma.&lt;BR /&gt;Placing it there is really bizarre.&lt;BR /&gt;  &lt;BR /&gt;This would translate to&lt;BR /&gt;  &lt;BR /&gt;$ passwd -s saz&lt;BR /&gt;saz  PS    12/29/05    0  7  &lt;BR /&gt; &lt;BR /&gt;Actually, since you already are using a Perl script, why not let Perl retreive the data by its built-in mappings of the standard syscalls?&lt;BR /&gt; &lt;BR /&gt;You can get displayed (via Config.pm) what your Perl built actually supports,&lt;BR /&gt;as far as passwords are concerned.&lt;BR /&gt;  &lt;BR /&gt;$ perl -V:d_pw.+&lt;BR /&gt;d_pwage='define'&lt;BR /&gt;d_pwchange='undef'&lt;BR /&gt;d_pwclass='undef'&lt;BR /&gt;d_pwcomment='define'&lt;BR /&gt;d_pwexpire='undef'&lt;BR /&gt;d_pwgecos='define'&lt;BR /&gt;d_pwpasswd='define'&lt;BR /&gt;d_pwquota='undef'&lt;BR /&gt;  &lt;BR /&gt; &lt;BR /&gt;Ah, that's a shame.&lt;BR /&gt;On HP-UX we don't get the passwd expiration,&lt;BR /&gt;but pwage is defined.&lt;BR /&gt; &lt;BR /&gt;You need to look at "perldoc -f getpwent"&lt;BR /&gt;to see what lists are returned.&lt;BR /&gt;  &lt;BR /&gt; &lt;BR /&gt;$ perl -e 'print join("\n",getpwnam("saz"),"")'&lt;BR /&gt;saz&lt;BR /&gt;eM6Z04PZmIo6c&lt;BR /&gt;102&lt;BR /&gt;20&lt;BR /&gt;/.KR&lt;BR /&gt;SAZ login&lt;BR /&gt;SAZ login&lt;BR /&gt;/home/saz&lt;BR /&gt;/sbin/sh&lt;BR /&gt; &lt;BR /&gt;  &lt;BR /&gt;That's really oblique.&lt;BR /&gt;My Perl build returns the aging string as 5th list element which ought to be the gecos field according to the POD.&lt;BR /&gt; &lt;BR /&gt;But now you only need to map the "encoding"&lt;BR /&gt;(which is some sort of Base64 according to "man 4 passwd")&lt;BR /&gt; &lt;BR /&gt;So you could probably do something like this&lt;BR /&gt;(sorry webserver flattens the indentations)&lt;BR /&gt;  &lt;BR /&gt;    &lt;BR /&gt;my (@agers, %map_age);&lt;BR /&gt;    &lt;BR /&gt;{ my $i=0;&lt;BR /&gt;        %map_age = map { $_ =&amp;gt; $i++ } (qw[. /], 0..9, 'A'..'Z', 'a'..'z');&lt;BR /&gt;}&lt;BR /&gt;while (my @rec = getpwent) {&lt;BR /&gt;        push @agers, [@rec[0,4]] if $rec[4];&lt;BR /&gt;}&lt;BR /&gt;  &lt;BR /&gt;foreach my $ager (@agers) {&lt;BR /&gt;        my ($max_weeks, $min_weeks) = &lt;BR /&gt;                map{$map_age{$_}} split(//, substr($ager-&amp;gt;[1], 0, 2));&lt;BR /&gt;        if ($max_weeks &amp;lt;= 1) {&lt;BR /&gt;                my $user_to_mail = $ager-&amp;gt;[0];&lt;BR /&gt;                #&lt;BR /&gt;                # implement emission of mail here&lt;BR /&gt;        }&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Jan 2006 12:43:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701773#M249434</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2006-01-04T12:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: passwd -a -s</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701774#M249435</link>
      <description>I have this figured out. We have a trusted system and when you pick the password aging on a user and pick Default(Enabled) it fills in our default values. The problem is the information in the users password file is incomple(/tcb/files/auth/). The u_minchg, u_exp, u_pw_expire_warning, u_life are not populated. If I change the password aging to Enable and fill in the info then the information is populated. I guess I don't understand that when you take the option of Default(Enabled) and the policies work it doesn't populate the fields until you manually type the information in and pick Enable.</description>
      <pubDate>Thu, 05 Jan 2006 13:41:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-a-s/m-p/3701774#M249435</guid>
      <dc:creator>Tim Downs</dc:creator>
      <dc:date>2006-01-05T13:41:49Z</dc:date>
    </item>
  </channel>
</rss>

