<?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: How to determine number of days left till password expire? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697755#M757488</link>
    <description>Hi,&lt;BR /&gt;Doesn't "passwd -s -a" give you what you need?</description>
    <pubDate>Fri, 05 Apr 2002 08:03:59 GMT</pubDate>
    <dc:creator>Deepak Extross</dc:creator>
    <dc:date>2002-04-05T08:03:59Z</dc:date>
    <item>
      <title>How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697752#M757485</link>
      <description>I have remote applications connecting to my server using it's own dedicated username and password. I have set it to expire after 84 days. But each time it expires, my application will have problems and I wouldn't know it till someone calls me up with a complain. Is there any command to check the number of remaining days before password expiration? I know the command passwd -s &lt;USERNAME&gt; shows the date of setting the password aging, but there's just too many to check manually. I'm actually trying to create a script to check the password expiration periodically. Any hints or helps is much appreciated.&lt;/USERNAME&gt;</description>
      <pubDate>Fri, 05 Apr 2002 07:43:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697752#M757485</guid>
      <dc:creator>Michael Kan</dc:creator>
      <dc:date>2002-04-05T07:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697753#M757486</link>
      <description>&lt;BR /&gt;You could do this writing a small C program using the system call&lt;BR /&gt;getprwent() . (see man )&lt;BR /&gt;&lt;BR /&gt;this call returns a struct pr_passwd which holds all informations you want &lt;BR /&gt;&lt;BR /&gt;I use this to generate a mail warning 5 days befor passwords expire&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;rainer&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Apr 2002 07:58:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697753#M757486</guid>
      <dc:creator>Rainer von Bongartz</dc:creator>
      <dc:date>2002-04-05T07:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697754#M757487</link>
      <description>I think one can play with the &lt;BR /&gt;/tcb/files/auth/system/default&lt;BR /&gt;and the&lt;BR /&gt;/tcb/files/auth/u/user1&lt;BR /&gt;files&lt;BR /&gt;&lt;BR /&gt;I think the needed tags are u_exp# and&lt;BR /&gt;u_succhg#.  If you add these to, and convert &lt;BR /&gt;the date, you should be able to construct the&lt;BR /&gt;expiration time (i guess).&lt;BR /&gt;&lt;BR /&gt;Hein Coulier</description>
      <pubDate>Fri, 05 Apr 2002 08:02:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697754#M757487</guid>
      <dc:creator>Systeemingenieurs Infoc</dc:creator>
      <dc:date>2002-04-05T08:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697755#M757488</link>
      <description>Hi,&lt;BR /&gt;Doesn't "passwd -s -a" give you what you need?</description>
      <pubDate>Fri, 05 Apr 2002 08:03:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697755#M757488</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-05T08:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697756#M757489</link>
      <description>sorry; the call is &lt;BR /&gt;&lt;BR /&gt;getprpwent().&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Rainer&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Apr 2002 08:09:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697756#M757489</guid>
      <dc:creator>Rainer von Bongartz</dc:creator>
      <dc:date>2002-04-05T08:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697757#M757490</link>
      <description>Rainer,Systeemingenieurs Infoco : Errr my system is not a trusted system. Am I still able to use the getprwent()?&lt;BR /&gt;And I am also no good in C. Any suggestion?&lt;BR /&gt;&lt;BR /&gt;Deepak : The passwd only gives me the date of enabling the aging of passwords.&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Apr 2002 08:43:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697757#M757490</guid>
      <dc:creator>Michael Kan</dc:creator>
      <dc:date>2002-04-05T08:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697758#M757491</link>
      <description>Sorry, as the manual says:&lt;BR /&gt;&lt;BR /&gt;getprpwent, getprpwuid, gettprpwaid, and getprpwnam each returns a&lt;BR /&gt;      pointer to a pr_passwd structure containing the broken-out fields of a&lt;BR /&gt;      line in the protected password database&lt;BR /&gt;&lt;BR /&gt;, so it's only valid for trusted systems&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Rainer&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Apr 2002 08:53:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697758#M757491</guid>
      <dc:creator>Rainer von Bongartz</dc:creator>
      <dc:date>2002-04-05T08:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697759#M757492</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can only set this up within the&lt;BR /&gt;confines of a trusted system. &lt;BR /&gt;Once setup this type of configuration&lt;BR /&gt;can be set per user. You can set up&lt;BR /&gt;global rules for most users, and &lt;BR /&gt;exceptions for special users should you&lt;BR /&gt;wish. These facilities are not available&lt;BR /&gt;without the system being setup as &lt;BR /&gt;trusted.&lt;BR /&gt;&lt;BR /&gt;If you have a test system, set it as&lt;BR /&gt;trusted and check it out. Using 'sam'&lt;BR /&gt;is the best way to start.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;~Michael~</description>
      <pubDate>Fri, 05 Apr 2002 09:03:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697759#M757492</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-04-05T09:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697760#M757493</link>
      <description>the expiration information appears to be stored in one of the files in /var/spool/pwgr.  they are all binary files, so if you don't do C, I'm not sure how you are going to extract the information.  pwd_name_hash.pag or pwd_uid_hash.pag appear to be the likely suspects from what I can gather using cat -v. however, they are both the same size, so they may be mirrored versions of each other, or at least have the same fixed format.&lt;BR /&gt;&lt;BR /&gt;a string search of the man pages does not return any references to /var/spool/pwgr (no big surprise), but you may find a reference to the files in a security doc or white paper if you search hp's web site.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;mark</description>
      <pubDate>Fri, 05 Apr 2002 14:49:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697760#M757493</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2002-04-05T14:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697761#M757494</link>
      <description>Hi Micheal:&lt;BR /&gt;&lt;BR /&gt;You were fortunate in that I already had a Perl script to do this. Note that in a non-trusted environment the expiration is encoded as the number of weeks left in base64. Man 4 passwd for details.&lt;BR /&gt;&lt;BR /&gt;If you execute pwwarn.pl user1 [user2 ...], it will output a line for each user like this&lt;BR /&gt;user1 4096&lt;BR /&gt;user2 2&lt;BR /&gt;user3 0&lt;BR /&gt;&lt;BR /&gt;Where the number is the number of weeks left. 4096 (64 * 64) indicates that this passwd does not expire.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Fri, 05 Apr 2002 17:37:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697761#M757494</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-04-05T17:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697762#M757495</link>
      <description>Hi A. clay Stephenson: How to I use a Perl script. I have only used Shell scripts ?&lt;BR /&gt;I don't know how to run the script that you created... Pls help.</description>
      <pubDate>Sat, 06 Apr 2002 01:54:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697762#M757495</guid>
      <dc:creator>Michael Kan</dc:creator>
      <dc:date>2002-04-06T01:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697763#M757496</link>
      <description>Depending upon the version of HP-UX that you are running, you have a very old version of Perl or the newer 5.6 version. If you are running 10.x, you have an old, obsolete version and you should install a newer version of Perl from any of the HP-UX Porting Centres.&lt;BR /&gt;e.g. &lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Languages/perl-5.6.1/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Languages/perl-5.6.1/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Execute perl -v to display your version.&lt;BR /&gt;&lt;BR /&gt;The Perl package is installed like any package using swinstall. Typically, you symbolically link /opt/perl5/bin/perl to /usr/bin/perl.&lt;BR /&gt;&lt;BR /&gt;After that you simply execute 'pwwarn.pl tom dick harry' just as you would a shell script. The 'shebang' statement #!/usr/bin/perl automatically causes the shell to invoke perl or your can execute explicitly like 'perl pwwarn.pl tom dick harry'.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Apr 2002 20:18:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697763#M757496</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-04-06T20:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697764#M757497</link>
      <description>Hi Rainer von Bongartz :&lt;BR /&gt;Can I request you to give me the C program ?? Because we will be converting our system into trusted later on. Really appreciate it.&lt;BR /&gt;Thank you.</description>
      <pubDate>Tue, 16 Apr 2002 09:00:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697764#M757497</guid>
      <dc:creator>Michael Kan</dc:creator>
      <dc:date>2002-04-16T09:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697765#M757498</link>
      <description>Michael,&lt;BR /&gt;&lt;BR /&gt;find the small C-program as attachment.&lt;BR /&gt;&lt;BR /&gt;Change it to your needs but dont't blame me for anything.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Rainer&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Apr 2002 12:16:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697765#M757498</guid>
      <dc:creator>Rainer von Bongartz</dc:creator>
      <dc:date>2002-04-16T12:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697766#M757499</link>
      <description>Thank you very much, Rainer von Bongartz.</description>
      <pubDate>Tue, 16 Apr 2002 23:26:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697766#M757499</guid>
      <dc:creator>Michael Kan</dc:creator>
      <dc:date>2002-04-16T23:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697767#M757500</link>
      <description>Hi Rainer von Bongartz,&lt;BR /&gt;&lt;BR /&gt;I get a coredump when running the executable. I compiled it with # cc -o exe source.c&lt;BR /&gt;Then when I run the exe, i get this msg --&amp;gt;&lt;BR /&gt;/usr/lib/dld.sl: Unresolved symbol: getprpwent (code)  from ./pwd_check&lt;BR /&gt;Abort(coredump)&lt;BR /&gt;&lt;BR /&gt;Anyone know why?&lt;BR /&gt;Thank you.</description>
      <pubDate>Thu, 18 Apr 2002 06:03:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697767#M757500</guid>
      <dc:creator>Michael Kan</dc:creator>
      <dc:date>2002-04-18T06:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697768#M757501</link>
      <description>Michael,&lt;BR /&gt;&lt;BR /&gt;try compiling with  -lsec&lt;BR /&gt;&lt;BR /&gt;cc -o exe source.c -lsec&lt;BR /&gt;&lt;BR /&gt;It will probably only work on a trusted system&lt;BR /&gt;&lt;BR /&gt;Rod</description>
      <pubDate>Wed, 08 May 2002 06:04:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697768#M757501</guid>
      <dc:creator>Rod McLean</dc:creator>
      <dc:date>2002-05-08T06:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine number of days left till password expire?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697769#M757502</link>
      <description>Thank you for your answers.&lt;BR /&gt;&lt;BR /&gt;I actually have downloaded another C program from the internet to calculate the number of days between two dates. From there I just write a shell script to use the program to check the number of days before the password expires.</description>
      <pubDate>Wed, 08 May 2002 06:43:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-determine-number-of-days-left-till-password-expire/m-p/2697769#M757502</guid>
      <dc:creator>Michael Kan</dc:creator>
      <dc:date>2002-05-08T06:43:28Z</dc:date>
    </item>
  </channel>
</rss>

