0

I am using CentOS and I want to set the minimum password length, minimum password expiry , maximum password expiry and password complexity in my system.

I have looked over some tutorials to change the system-auth file, but it didnt work.

Hoping to get some answers here.

Thanks in advance :D

4
  • 3
    Which tutorials? What happened when you tried them? Commented Jun 26, 2014 at 7:35
  • Added few lines in the system-auth file but nothinghappens. Commented Jun 26, 2014 at 8:15
  • It still accepts any password you give them when i do "passwd" Commented Jun 26, 2014 at 8:15
  • What lines did you add? What tests did you do to check that “nothinghappens”? Commented Jun 27, 2014 at 22:00

1 Answer 1

2

Some of those are set by the system administrator with the passwd command.

-n This will set the minimum password lifetime, in days, if the user's account supports password lifetimes. Available to root only.

-x This will set the maximum password lifetime, in days, ...

Other are managed through the PAM module cracklib. The pam_cracklib man page should document what features are supported on your system. You can set those in either /etc/pam.d/system-auth global configuration file and/or the passwd specific file /etc/pam.d/passwd e.g.

# /etc/pam.d/passwd
... 
password  required pam_cracklib.so difok=3 minlen=15 dcredit= 2 ocredit=2
2
  • I tried doing that in the system-auth file still no changes were observed when i actually changed the password Commented Jun 26, 2014 at 8:55
  • 1
    Could you amend your question with the contents of the relevant pam.d configuration files? Commented Jun 26, 2014 at 8:57

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.