title: Linux,I want to set user passwd which contains the username,How to set passwd policy?
body: <p>I hava know a litter about linux passwd policy,I have establish a new user</p>
  
  <pre><code>useradd testuser
  </code></pre>
  
  <p>And I want to set the testuser's passwd  as <code>abtestuserab</code>
  I input </p>
  
  <pre><code>passwd testuser
  </code></pre>
  
  <p>the input <code>abtestuserab</code>
  It's failded,the terminal reported</p>
  
  <pre><code>BAD PASSWORD: The password contains the user name in some form
  </code></pre>
  
  <p>So,how to make the passwd valid.
  the /etc/pam.d/system-auth is like this</p>
  
  <pre><code>auth        required      pam_tally2.so onerr=fail deny=10 unlock_time=600 root_unlock_time=600 audit
  auth        required      pam_env.so
  auth        sufficient    pam_unix.so nullok try_first_pass
  auth        requisite     pam_succeed_if.so uid &gt;= 1000 quiet_success
  auth        required      pam_deny.so
  
  account     required      pam_unix.so
  account     sufficient    pam_localuser.so
  account     sufficient    pam_succeed_if.so uid &lt; 1000 quiet
  account     required      pam_permit.so
  
  password    requisite     pam_pwquality.so minlen=9 try_first_pass local_users_only retry=3 authtok_type= enforce_for_root ocredit=0 lcredit=-1 ucredit=-1 dcredit=-1 [badw
  ords=first2012++]
  password    required      pam_pwhistory.so remember=10 use_authtok enforce_for_root
  password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok
  password    required      pam_deny.so
  
  session     optional      pam_keyinit.so revoke
  session     required      pam_limits.so
  -session     optional      pam_systemd.so
  session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
  session     required      pam_unix.so
  </code></pre>