- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Set password aging options on NIS password
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
04-17-2002 07:48 AM
04-17-2002 07:48 AM
user:password,MmNN:uid:gid:gecos:path:shell
M=max (.=0,/=1,0=2,9=11,A=12,Z=37,a=38,z=63)
m=min
NN=time password was changed last time
I know that the M, m, and NN are used for password aging. I imagine I can just leave the values for M and m alone, but how do I calculate a new value for NN?
When I "man 4 passwd" it says that NN define the week (counted from the beginning of 1970) when the password was last changed. To test this I just changed my password today and the values for NN are "IO". How does "IO" or the digit values "I"=20 and "O"=26 correlate to what the man page is saying. How can I generate these values when I run my process to manually generate encrypted passwords?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 08:22 AM
04-17-2002 08:22 AM
SolutionLets suppose that the cuurent week is 64 weeks since the beginning of time (Jan 1, 1970).
That would be encoded as 1 x 64^^1 + 4 x 64^^0 or "2/" from the above character set in REVERSE order. 2 ==> 4 and / ==> 1.
Fortunately, I already had a small perl script to do this. It simply takes the current date and outputs the encoded value to stdout.
Use it like this:
PWAGE=$(pwage.pl)
echo "PWAGE (Current Date) = \"${PWAGE}\""
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 08:34 AM
04-17-2002 08:34 AM
Re: Set password aging options on NIS password
If you made a password change on 3/5/02 (tue), the information you got if you run ..
# logins -x -l
will show it's changed on 2/28/02 (thur) instead, because of the starting time on 1/1/70 (which is thur) the last password change will be on Thursday before the actual modification day.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 11:02 AM
04-17-2002 11:02 AM
Re: Set password aging options on NIS password
Lets suppose that the cuurent week is 68 weeks
(14 base-64) since the beginning of time (Jan 1, 1970).
That would be encoded as 1 x 64^^1 + 4 x 64^^0 or "2/" from the above character set in REVERSE order. 2 ==> 4 and / ==> 1.
This is a slighty cleaner version of the Perl script as well although the above example works just fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 12:08 PM
04-17-2002 12:08 PM
Re: Set password aging options on NIS password
I can convert the perl to java to my use. However if
my $curr_wk = time() / SECONDS_PER_DAY / DAYS_PER_WK; gives the week number(since 1/1/1970), do you know a comparable function to Perl's time() in unix shell or java since I cannot use Perl for my app?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 12:18 PM
04-17-2002 12:18 PM
Re: Set password aging options on NIS password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 07:38 AM
04-18-2002 07:38 AM
Re: Set password aging options on NIS password
Travis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 07:41 AM
04-18-2002 07:41 AM