Welcome to forum, kindly use code tags for commands/codes/Inputs which you are using in your posts.
Could you please use following command and let us know if this helps.
-s option will require root, which the OP doesn't have access to.
It will work only for current user which is logged on, will not accept <username> as a parameter with Permission denied.
Also, on default HPUX boxes don't have /etc/shadow. You can install it.
My HP-UX is 11.11 :o and stores files in /tcb/files/auth with the various details you are after. The values are stored in seconds since the Epoch (00:00:00 on 1/1/1970)
The problem you will have is that without superuser access, you are not considered trustworthy enough to know this information.
One wonders why you need to know anyway. Can you enlighten us?
On a Solaris system using nisplus password administration, the command:
passwd -r nisplus -s
will show you the password aging information for your account.
It appears that HP/UX has a similar feature, but the online HP/UX passwd(1) man page in the Man Pages tab in this forum seems to be mangled, so I can't tell you what options you need to use to get it nor what restrictions apply to unprivileged users accessing that data.
Looking for the -s option in output from the command man 1 passwd on your HP/UX system may help you find what you want.
Robin,
One reason for wanting to know when my password will expire is that some system administrators set up password aging requiring that a password be changed every six months and you may want to check to be sure that your password won't expire while you're out of the office on vacation for a couple of weeks.
It can also be used as a sanity check to see when your password was last changed. If you find that it changed recently and you didn't do it, it is confirmation that your account has been modified by someone (even if they restored your original password so you can still login).