Getting password expiration date - HP UX

This is a discussion on Getting password expiration date - HP UX ; We are using password aging on our HP-UX 11.11 system, and I've recently been told that if a user goes into the system using SSH then they will never see a warning about their password expiring. We have experienced this ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Getting password expiration date

  1. Getting password expiration date

    We are using password aging on our HP-UX 11.11 system, and I've
    recently been told that if a user goes into the system using SSH then
    they will never see a warning about their password expiring. We have
    experienced this recently and it was ugly. Anyway, is there a way to
    programmatically get a user's expiration date for their password? I
    can set up a script to email folks to warn them if so. Thanks.


  2. Re: Getting password expiration date

    Yes you can. Check out the man page passwd(4) (man 4 passwd). It will
    tell you how to decifer the aging portion of the password field in the
    passwd file.


  3. Re: Getting password expiration date

    jc@kc.rr.com wrote:
    > We are using password aging on our HP-UX 11.11 system, and I've
    > recently been told that if a user goes into the system using SSH then
    > they will never see a warning about their password expiring. We have
    > experienced this recently and it was ugly. Anyway, is there a way to
    > programmatically get a user's expiration date for their password? I
    > can set up a script to email folks to warn them if so. Thanks.
    >

    Are you using trusted systems? if so getprpw(1M). It depends on what
    versions of ssh and your patch levels on the system too, there have been
    issues that have been patched recently.

  4. Re: Getting password expiration date

    Yes, we are using trusted systems. I found the getprpw command and
    used that in conjunction with getprdef to get what I needed. Thanks.


  5. Re: Getting password expiration date

    belvilad wrote:
    : Check out the man page passwd(4) (man 4 passwd). It will
    : tell you how to decifer the aging portion of the password field in the
    : passwd file.

    I just wrote a program to do this. It seems there is not enough info
    to indicate for the last 2 chars, you compute the weeks by:
    Mndd
    0123 char array position
    c[3]*64 + c[2]
    Instead of the more obvious assumption that the left one is the high order
    "digit".

+ Reply to Thread