Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to setup a proxy service using squid and want it to authenticate against a database or another service.

There is an example config at

auth_param basic program /usr/local/squid/libexec/squid_db_auth --user someuser --password xxxx --plaintext --persist
auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 1 minute
auth_param basic casesensitive off

acl db-auth proxy_auth REQUIRED
http_access allow db-auth
http_access allow localhost
http_access deny all

the relevant snippet appears to be

auth_param basic program /usr/local/squid/libexec/squid_db_auth --user someuser --password xxxx --plaintext --persist

Do I have to replace someuser with actual username and xxxx with password?

For each user I add, do I have to add it to this config?

Ideally, I want a setup whereby, I am able to add/remove users to the service without changing the config file. Is this possible?

share|improve this question
up vote 1 down vote accepted

--user someuser and --password xxxx are the username and password used to authenticate against the MySQL database. The proxy users must be created in the table passwd inside the squid database.

For reference: squid_db_auth manpage, how to build squid authentication helpers.

share|improve this answer
thanks. I didn't realize that squid_db_auth was actually a program. It makes assumptions about db name and table names, which was throwing me off. Its man page ( helps. Also - a post helps in figuring out what is exactly required of such a helper. – Nasir Dec 24 '12 at 1:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.