1833467 Members
2933 Online
110052 Solutions
New Discussion

Doubt using passwd

 
ronaldt Mendes
New Member

Doubt using passwd

Hi, Guys.

I am trying to set my password expiration for 180 days.
But when try the following command:
passwd -x 180 user1
and when I try this
passwd -s user1
user1 PS 06/09/09 0 182 14

Why the system shows 182 days instead of 180?
Thanks
3 REPLIES 3
Steven Schweda
Honored Contributor

Re: Doubt using passwd

HP-UX version? ("uname -a".)

"man passwd"?

[...]
The min and max arguments are each
represented in units of days. These
arguments will be rounded up to the nearest
week on a standard HP-UX system. [...]

What's "(180+ 6)/ 7* 7"?
Steven E. Protter
Exalted Contributor

Re: Doubt using passwd

Shalom,

The reason for 182 days instead of 180 is by default, HP-UX rounds aging to the nearest week.

182 divides evenly to 26 weeks.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: Doubt using passwd

HP-UX standard security has a very small space to keep the expiration data. Only 2 characters are used so weeks are used rather than days. See the man page passwd file format:

man 4 passwd


Bill Hassell, sysadmin