How do I get Squid to log "User Names" or IDs?

I have Squid installed and logging URLs requested by any account on my Mac. However, in the log, the user field is simply "-" for all users. How do I get Squid to add the Mac "User Name" or ID for each user on my own machine? I want to track URLs visited by each user to keep an eye on where my kids surf.

Is this type of logging possible using Squid? I am only using Squid for this purpose. My proxy is NOT open to other machines, only the localhost can get to it. I am only concerned about users on this one mac that is running squid.

I used SquidMan ( http://homepage.mac.com/adg/SquidMan/index.html) to install squid and highly recommend it for simple installations. I have installed SARG ( http://www.d2m.com.br/community/sarg_port/) for making log reports by user. It works well, but all of the users on my mac are reported as the localhost (127.0.0.1), not by Mac login ID.

Is this possible?

Mac OS X (10.4.6)

Posted on Apr 21, 2006 4:22 PM

Reply
3 replies

Apr 21, 2006 4:55 PM in response to Paul St. Amand

They won't include a Mac user id - there's nothing in a typical HTTP request that includes the username of the user running the web browser at the other end of the connection.

If you think about how a proxy server is usually deployed, it's proxying traffic for a number of clients, which could be on any platform, any OS and any browser so knowing the name of an active user on the proxy server itself is useless to squid.

The username field in the logs is based on squid's proxy authentication username and password, not the username and password of the active user (they can be different). If you look in System Preferences -> Network -> <interface> -> Proxies there is a 'Proxy server requires authentication' checkbox, and it's the username and password entered here that would be logged.

Off hand, I don't know if that username/password is user or system-based. If it's user-based you should be able to set it up for each user, but if it's system-based, all users on the same machine would have the same proxy authentication credentials.

In order to use it you need to configure authentication in squid's configuration files. http://squid.visolve.com/squid/squid24s1/access_controls.htm has a discussion of the setup.

Apr 22, 2006 2:19 PM in response to Camelot

I had to install NCSA_auth and configure the squid acl lines but it IS now logging users by ID. You must also change your network settings and enable a proxy web server. You must also create a password file with an ID and password for each user. Users will be prompted for an ID and password at the beginning of a web surfing session.

Squid is working if I start it from the terminal, but I can't seem to get squid to automatically start after a reboot. I want it to run at all times. I think I would need some type of "launchd" script or file, but I am lost here...

Anyone know how to get squid to autolaunch?

Mac OS X (10.4.6)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I get Squid to log "User Names" or IDs?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.