Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Password History, Length

Posted on 2003-10-28
10
Medium Priority
?
665 Views
Last Modified: 2007-12-19
I want to set password history to 6 in Linux 8 Advanced Server systems as well as Max password length to 10. Does anyone know how to set it, so as user can not repeat his last 6 password. If you can give me file format, option details, will be helpfull.

Thanks,
Ameet
0
Comment
Question by:ameetphanse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 13

Accepted Solution

by:
rhinoceros earned 60 total points
ID: 9639736
1. The default has "minimum password length" setting only as I know
http://www.faqs.org/docs/securing/chap5sec31.html

2. No history by default

I hope it can help.
0
 
LVL 20

Expert Comment

by:Gns
ID: 9640687
CC rhino, there are minlength and "quality" parameters, but no maxlen.

Now, what distro is that? Linux is the kernel, so naming it conveys no information. The number eight has been used by many distros (as version identifier:-)... Suse has the version 8 Enterprise server, Mandrake have similar offerings... and RH has the Advanced Server but have only reached version 3 for that... So which one is it?

If your system is using pam, chances are great you'll be able to implement the "memory" function by simply adding "remember=6" to the pam_unix module spec, and "touch /etc/security/opasswd" so that it can store the old passwds (MD5 crypted) someqwhere safe... On a RedHat system the relevant files look like this (this is from a RH8 system):
----------- /etc/pam.d/passwd
#%PAM-1.0
auth       required     /lib/security/pam_stack.so service=system-auth
account    required     /lib/security/pam_stack.so service=system-auth
password   required     /lib/security/pam_stack.so service=system-auth
-----------
This shows that we need look at the "stacked" file /etc/pam.d/system-auth
----------- /etc/pam.d/system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      /lib/security/pam_env.so
auth        sufficient    /lib/security/pam_unix.so likeauth nullok
auth        required      /lib/security/pam_deny.so

account     required      /lib/security/pam_unix.so

password    required      /lib/security/pam_cracklib.so retry=3 type=
password    sufficient    /lib/security/pam_unix.so nullok use_authtok md5 shadow
password    required      /lib/security/pam_deny.so

session     required      /lib/security/pam_limits.so
session     required      /lib/security/pam_unix.so
----------
The relevant line is the  
password    sufficient    /lib/security/pam_unix.so nullok use_authtok md5 shadow
line that you should change to read
password    sufficient    /lib/security/pam_unix.so nullok use_authtok md5 shadow remember=6
And then you should
touch /etc/security/opasswd
or else it'll claim that _all_ passwords have been previously used (not for root though, since root isn't checked... Not even when doing "passwd user").

You might also like to look at the docs for pam_unix and pam_cracklib ... you probably have some to-the-point READMEs in /usr/share/doc/pam-*/txts/, as well as the complete pam docs in the directory above.

-- Glenn
0
 
LVL 20

Expert Comment

by:Gns
ID: 9640693
.... As you'll note, there isn't any "maxlength", but there are parameters governing how many "significant" characters the modules operate on.

-- Glenn
0
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 
LVL 2

Expert Comment

by:sam_sunder
ID: 9763085
hi Ameet.

You can change the password configuration in /etc/login.defs. I could not understand what you meant by History.

regards,

sam
0
 
LVL 20

Expert Comment

by:Gns
ID: 9763153
No sam, login does not use login.defs... useradd does. Kind of counterintuitive:-). On most systems login/passwd uses PAM, which enforce the password lilimts through the modules mentioned above.

-- Glenn
0
 
LVL 20

Expert Comment

by:Gns
ID: 10183041
Point split between rhinoceros and me, if it were more than 20... As things stand, I'd say give'm to rhino.

-- Glenn
0
 

Author Comment

by:ameetphanse
ID: 10184037
Glenn's Answeris perfect. I have set it by usiing pam.d/system-auth & passwd files. I wated to click on "Accept" to his answer. As I am new to use this site, made wrong accept selection.

maxlength is not set & I guess it is not possible.
password    required      /lib/security/pam_cracklib.so retry=3 minlen=6 type=
password    sufficient    /lib/security/pam_unix.so nullok use_authtok md5 shadow remember=6  
This system-auth entry has fixed History to 6 & minimum length to 6 as well.

Thanks Glenn !

Ameet
0
 
LVL 20

Expert Comment

by:Gns
ID: 10185086
Ok... You should place a question referensing this one in the "Community Supoort" area if you'd like to change that "missclick".
But it's OK by me if you let things stand as they are. Points aren't everything (far from it, most experts "do this" for fun!), knowing that it helped you is though (that warm feeling of satisfaction:-).

-- Glenn
0
 

Author Comment

by:ameetphanse
ID: 10185171
Thats true.. the reason, I put comments whats helped me & what is true :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question