LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Problem installing squid as a web filter with dansguardian (https://www.linuxquestions.org/questions/slackware-14/problem-installing-squid-as-a-web-filter-with-dansguardian-569982/)

davimint 07-17-2007 12:18 AM

Problem installing squid as a web filter with dansguardian
 
While I was "trying" to install samba I noticed several files on the kids computer that were not the best flavor for their age. To fix this window's box I install some software but I decided it may be best to also install something on my linux boxes.

I found the following link to set up squid with dansguardian http://www.linux.com/articles/113733.

In the squid section where it ask me to check and set up groups for squid it uses the following -r switch and I can't get it to work and don't find any reference to it in the man page. I've googled and have yet to find anything.


Code:

groupadd -r squid
useradd -g squid -d /var/spool/squid -s /bin/false -r squid

Also, to make things even worse I tried the following two commands thinking they would be correct.

groupadd -g 43 -o squid
"I used gid #43 because there was not a gid using that number" but instead of putting the #43 in order like I thought it would it put at the end of the file. So now I want to fix what I just messed up and I can't. When I try to remove it I get the following.

Code:

bash-3.1# groupdel squid
groupdel: cannot remove user's primary group.

I also tried the useradd without the "-r" from the above
post like follows and not for sure what it did if anything.

Code:

useradd -g squid -d /var/spool/squid -s /bin/false squid
I guess I'll never learn.
Anyway, I need some help.

davimint 07-17-2007 06:11 PM

Ok, I had to delete the user "squid" before I could remove the group squid.
But anyway that's fixed. "lession learned"

So, now I just need to read up on squid and figure out the "-r" switch in the directions I'm using... Or find some better directions on installing squid.

granth 07-20-2007 10:40 AM

When you installed Squid, the proper user/group should have been added automatically.

At work, I use FreeBSD + Squid + Dansguardian. It is a very capable and reliable setup.

It is a good idea to use Squid's transparent proxy feature, so you do not need to make any changes on your client machines, except for default gateway. This feature needs to be compiled in .

mRgOBLIN 07-21-2007 05:18 AM

Been using squid and DansGuardian for years and it works like a charm

I would guess those -r options are for another distro's groupadd/useradd.

Something like this should work.

Code:

#!/bin/sh

if [ ! "$(grep -s "^squid" /etc/group)" ]; then
        /usr/sbin/groupadd -g 95 squid
fi

if [ ! "$(grep -s "^squid" /etc/passwd)" ]; then
        /usr/sbin/useradd -d /var/spool/squid -g squid -u 95 -s /bin/false squid
fi

/bin/chown -R squid.squid /var/spool/squid



All times are GMT -5. The time now is 06:36 PM.