Enable User Authentication in Squid
in the same config file we have been using :
cd /etc/squid/conf.d/local.conf
auth_param basic progarm /usr/lib/suid/basic_ncsa_authand i am telling squid to use basic authentication, maybe you want LDAP you can do that by choosing the program for LDAP, and you can find them in /usr/lib/squid
root@ubuntu:/usr/lib/squid# ls
basic_db_auth basic_radius_auth ext_file_userip_acl helper-mux pinger
basic_fake_auth basic_sasl_auth ext_kerberos_ldap_group_acl log_db_daemon security_fake_certverify
basic_getpwnam_auth basic_smb_auth ext_ldap_group_acl log_file_daemon storeid_file_rewrite
basic_ldap_auth basic_smb_auth.sh ext_session_acl negotiate_kerberos_auth unlinkd
basic_ncsa_auth cert_tool ext_sql_session_acl negotiate_kerberos_auth_test url_fake_rewrite
basic_nis_auth digest_file_auth ext_time_quota_acl negotiate_wrapper_auth url_fake_rewrite.sh
basic_pam_auth digest_ldap_auth ext_unix_group_acl ntlm_fake_auth
basic_pop3_auth diskd ext_wbinfo_group_acl ntlm_smb_lm_authFor the basic config program, it is common to follow up the configuration with the file storing credentials which is ‘htpasswd’
auth_param basic progarm /usr/lib/suid/basic_ncsa_auth /etc/squid/htpasswdI also need to provide any other configuration parameter needed
auth_param basic realm proxyNow, we just need to tell squid to use it
Now we can create the file or let the system do that like this:
ubuntu is the username
to add more users, use -a to append
Last updated