[SOLVED] Default max password expiry is 99999 days, why?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
# Password aging controls:
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes
# PASS_MIN_LEN Minimum acceptable password length.
# PASS_WARN_AGE Number of days warning given before a password expires
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_MIN_LEN 5
PASS_WARN_AGE 7
Why is it 99999 days? 5 nines. What is special about this? Does it have to be 5 characters? It coulda been 9999, even 999 days. I feel like there’s a reason it is 99999.
I realize this doesn’t matter for function, but I am curious as to why. If there is no reason, I want to know that too.
Last edited by mintner; 11-22-2019 at 10:24 PM.
Reason: More information
My quick guesx is 99,999 is just under 275 years, thus 9999 would be just under 27 years. Where the latter can happen in the life span of code ( I had a job in the early 1990's updating code written in the 1960's), the former is not. Since you have a field of width X, X=4 could cause an issue, but X=5, if it caused an issue would be 200 years after the person who caused it died.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
Quote:
Originally Posted by mintner
# Password aging controls:
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes
# PASS_MIN_LEN Minimum acceptable password length.
# PASS_WARN_AGE Number of days warning given before a password expires
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_MIN_LEN 5
PASS_WARN_AGE 7
Ugh! The system'll allow someone to use a 5-character password for nearly 274 years. The auditors will have a cow.
As for why "99999"? Probably just some value the person that set up the configuration pulled out of thin air (or somewhere else). "12345" (a still-too-long 33.8 years) could have been just as likely found in the config. I've always figured that PostgreSQL listens on port "5432" for much the same reason.
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,673
Rep:
Oops! Already solved but here's my worth...
Quote:
Default max password expiry is 99999 days, why?
Because it's a five numeric digit field? The largest single decimal number is 9, so 99999 would be the maximum allowable number. You'd have to ask the person who originally coded this why they wanted five digits but to me, it looks like it's equivalent to "Password does not expire."
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.