Operating System - HP-UX
1833762 Members
2679 Online
110063 Solutions
New Discussion

" passwd -s " showing inappropriate output

 
praveen prasanth
Occasional Visitor

" passwd -s " showing inappropriate output

In a non-trusted system when we modify the password attribute of a user (e.g.: passwd -x
1 ) and run the command "passwd -s " it will not show the modified date in its output. (The attribute round up to the starting day of the nearest week i.e. Thursday according to Jan 1 1970 calendar).

Is there any patches or any fix to resolve this issue.. i want the password attributes modified date to be shown when i type the command "passwd -s"

Please advice me in this issue.
4 REPLIES 4
Peter Godron
Honored Contributor

Re: " passwd -s " showing inappropriate output

Raveen,
if you read:
man 4 passwd
you can see the details about aging.
" UNIX keeps internal time stamps in a format with a base date of
Thursday January 1, 1970. Because of this, passwd considers the
beginning of a week to be 00:00 GMT Thursday."
Bill Hassell
Honored Contributor

Re: " passwd -s " showing inappropriate output

There are only 4 characters in password aging for non-Trusted systems. Two are for the modified date and the other two are for the weeks before expiration. In other words, all the codes are for weeks. Unlike a Trusted system, there is no place to store a more detailed date/time. See:

man 4 passwd


Bill Hassell, sysadmin
praveen prasanth
Occasional Visitor

Re: " passwd -s " showing inappropriate output

I understand that it always take the first day of the nearest week as the passwd modified date but
i want to make my system display the exact modified date when i`ll run the command "passwd -s".
Is there any solution for this?
Bill Hassell
Honored Contributor

Re: " passwd -s " showing inappropriate output

Yes. Change to a Trusted system. The unit of measure (1 week) for standard password aging has been Unix standard for decades.


Bill Hassell, sysadmin