1

I need to know how to change the current password setting to become more complex. My current password setting are very weak the minimum password character number is 1 which it should be at least 8 .

2
  • What do you use to set the password? passwd will already not allow simple passwords unless you change it a password as root.
    – Anthon
    Feb 15, 2016 at 11:15
  • OP question sound like: "where do I tell passwd I want uppercase, lowercase, special char and at least 256 char in password, also password should no be reuse within seen years and seven days ? "
    – Archemar
    Feb 15, 2016 at 12:56

1 Answer 1

4

It possibly depends on the distribution you use, but on CentOS/RedHat, you can find the default values in /etc/login.defs:

# 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

and there's additional constraints you can set with PAM: I find

password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=

in my /etc/pam.d/system-auth, where the pam_pwquality.so does things like the "it is based on a dictionary word" check and retry is the number of tries you get on login, but a full introduction to PAM would probably exceed the scope of an answer.

2
  • Thank you all, Ulrich I need to know where can I find password setting in which I could change minimum length of the password to become 8
    – W.sa
    Feb 16, 2016 at 6:12
  • @W.sa: well, /etc/login.def's PASS_MIN_LENGTH seems like the place to edit. Feb 16, 2016 at 6:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .