Squid - ncsa_auth MD5 password fails
Issue
- Following the guidelines as described on How do i configure Squid proxy authentication using ncsa_auth will cause problems using MD5 passwords
ncsa_authcannot use MD5 encrypted passwords
$ htpasswd -c ./passwordfile user1
New password:
Re-type new password:
Adding password for user user1
$ echo user1 user1 | /usr/lib64/squid/ncsa_auth ./passwordfile
ERR Wrong password
Using CRYPT passwords works well:
$ htpasswd -d -c ./passwordfile user1
New password:
Re-type new password:
Adding password for user user1
$ echo user1 user1 | /usr/lib64/squid/ncsa_auth ./passwordfile
OK
- The aim is to use MD5 encryption since CRYPT passwords are 8th characters limited
Environment
- Red Hat Enterprise Linux (RHEL) 6.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.