- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- password aging and that screwy base 64 date
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 02:37 AM
08-27-2004 02:37 AM
The book "HP-UX 11i Security" by Chris Wong (published by HP Professional Books, so you'd think it knew what it was talking about) says that the last two bytes of the extension is "weeks (in base 64) since 1970 when password was last changed..." (page 46). This makes sense, since 1970 is a really familiar date to all us Unix weenies.
But in practice, when we have aging turned on and we change a password, it looks like the system is setting that field to weeks since 1988 or there abouts. Am I just nuts or is there something I've overlooked, or is the book wrong or what?
Any hints will be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 02:55 AM
08-27-2004 02:55 AM
Re: password aging and that screwy base 64 date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 02:55 AM
08-27-2004 02:55 AM
Re: password aging and that screwy base 64 date
quoting from the "man 4 passwd"
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.
The first character of the age, M, denotes the maximum number of weeks
for which a password is valid. A user who attempts to login after his
password has expired is forced to supply a new one. The next
character, m, denotes the minimum period in weeks that must expire
before the password can be changed. The remaining two characters
define the week when the password was last changed (a null string is
equivalent to zero). M and m have numerical values in the range 0
through 63 that correspond to the 64-character set of "digits" shown
above.
If m = M = 0 (derived from the string . or ..), the user is forced to
change his password next time he logs in (and the "age" disappears
from his entry in the password file). If m > M (signified, for
example, by the string ./), then only a superuser (not the user) can
change the password. Not allowing the user to ever change the
password is discouraged.
Looks like that's true.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 03:07 AM
08-27-2004 03:07 AM
Re: password aging and that screwy base 64 date
If you do
man 4 passwd
you find some explanation of password aging for HPUX. The coding of aging is very smart, they use reverse order, i.e. if you want to calculate the aging for ABCD, you have to do: D*64+C.
You can simplify the process:
Write a script, which will write
,B/..
at the end of the password field. This defines 90 days password life and requires to change the existing password with the first login attempt.
You can use the script from crontab for a group of users, let's say 100-200 users per day and by such a way you complete the mission in a couple of months. Please take into account that such an aging doesn't work for LINUX and Solaris, only for HPUX
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 03:07 AM
08-27-2004 03:07 AM
Re: password aging and that screwy base 64 date
jeff:Jg4uAVz/ogxIg,3/DQ:9899:286:JeffTest:/tmp:/bin/ksh
You can see that the "weeks since password was last set" part is DQ which decodes to (15 * 64) + 28, which is 988. 988 / 52 weeks is 19 years, 19 years plus 1970 is 1989. That's what I don't get. We did this a couple of weeks ago, not in 1989.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 03:08 AM
08-27-2004 03:08 AM
Re: password aging and that screwy base 64 date
For example try the following:
user1:--hash---,41/.:uid:gid:....etc
"/." represents that data PW was last changed.
Then run:
passwd -s -a
user1 PS 01/08/70 0 42
Don't forget, "."=0, "/"=1, 0-9=2-11, A-Z=12-37, a-z=38-63
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 03:22 AM
08-27-2004 03:22 AM
SolutionQ = 28
D = 15
(28 * 64) + 15 = 1807
Now let's use caljd.sh to see if this makes sense (search the Forums for this script - Version 2.23 is the latest)
Today's Julian Day:
caljd.sh
2453245
1-Jan-1970 CE's Julian Day = 1808
It looks like your most recent passwd change was done last week (or at least before Thurday).
caljd.sh 1 1 1970
2440588
Difference in days
2453245 - 2440588 = 12657
Diffence in weeks (integer math)
12657 / 7 = 1808
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 03:31 AM
08-27-2004 03:31 AM
Re: password aging and that screwy base 64 date
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2004 06:34 AM
08-29-2004 06:34 AM