Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running Slackware 12.2, what package manager? My mistake, on how I did this, I have to give more details on what I did. I will try what you posted to do and post back the results.
Oups, you didn't say how you installed db-4.5, so I thought you've used your distro's package manager, in which case you need to install also the development package
Anyway, if you compiled db-4.5.20 from source, then I guess it's installed in /usr/local/BerkeleyDB.4.5, in which case you need to use the following to configure squid:
Don't forget to run "make distclean" before running ./configure
Regards
Hi bathory,
I tried the above command you suggested, it came back with errors and didn't install correctly. This is a older machine that wasn't installed with all the packages from the slackware installation disk. So I decided to download Slackware 13.1 and install on a new machine, and installed every package, I installed Squid. Configured it with the --enable-external-acl-helpers=session, and it installed fine. I see squid_session in the /usr/local/squid/libexec/ directory. I see how it installs correctly now, I would to get this to work on the original machine, (installing squid_session) After using pkgtool, I see that I can reinstall a package from the slackware disc. Which package would I need to install from my Slackware disc, so that my Berkeley DB error will go away when I reconfigure Squid?
Looks like Slackware 12.2 comes with both libdb-4.2 and libdb-4.4 libraries.
You can install any of them, as they both provide the missing header file. IMHO better install the newer one (libdb-4.4.20-i486-2.tgz)
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
not sure if its possible with apache per-se but i would imagine some sort of authentication type server like a radius server could do this, that sort of thing is done in hotels and airport internet kiosks quite often where until a mac address is authenticated it redirects all traffic from that machine to a site for them to enter payment information and then expires the authentication once they amount of time paid for is up,
Looks like Slackware 12.2 comes with both libdb-4.2 and libdb-4.4 libraries.
You can install any of them, as they both provide the missing header file. IMHO better install the newer one (libdb-4.4.20-i486-2.tgz)
Hi bathory,
I followed your link you provided, looking through packages, I don't see (libdb-4.4.20-i486-2.tgz). Is the package I need, named something else or am I blind?
I am running Slackware 12.0, I downloaded (db44-4.4.20-i486-2.tgz) using wget. I tried to untar it, to install it, but it didn't work. Then I tried to use pkgtool to install it, the package shows up and click yes to install it. Waits for 20 sec., seems like it is installing it. But when I go to reconfigure Squid, it error missing header files. Am I missing on how to install this?
and modified it to my needs. After the agreement text I've just added:
Code:
<p>Click <a href="%U">here</a> to continue</p>
so the user can click on this link and continue to the requested page.
Regards
Hi bathory,
I successfully installed Berkeley db package using installpkg. I reconfigured Squid with squid_session, after looking through the directories I don't have /usr/local/squid/share/errors/templates/banner. Did you create the directories /templates/banner.
I have /usr/local/squid/share/errors/English/ERR_ACCESS_DENIED that is where I found the templates. Do I need to create those directories?
I see what you did with this command: cp /usr/local/squid/share/errors/templates/ERR_ACCESS_DENIED /usr/local/squid/share/errors/templates/banner, you copied the ERR_ACCESS_DENIED template and renamed banner, right? My directory location is located in /usr/local/squid/share/errors/English. I copied that Error template and renamed to banner in that directory. I rebooted the my server, opened a webpage on a client machine and seen that the squid error template was displayed. However when I did a reload of the webpage it went to google, and when I closed the browser and reopened it, I was never given that squid error webpage again. I thought the webpage was suppose to come up everytime the browser was reopened.
I want the agreement page to come up everytime the browser is opened though.
This is how squid_session works if I can understand well the manpage.
Looking at squid.conf, I think you can try %SRCPORT instead of %SRC to see if it does what you're trying to do. Because everytime you close and reopen your browser, it uses a different source port to connect to squid.
Other things to try if the above does not work:
You can use a smaller timeout (e.g. -t 60), so the session timeouts sooner (every minute). But in this case if the user stays idle for a min. it will be presented with the agreement page, when he tries to use the browser again.
Or you can change %SRC, with %LOGIN, so the session lasts as long as the user stays logged in. Of course you need to authenticate users in squid in this case. Note also that if the user closes its browser without logging out first and then re-opens it, he won't see the agreement page if the session hasn't timeout.
This is how squid_session works if I can understand well the manpage.
Looking at squid.conf, I think you can try %SRCPORT instead of %SRC to see if it does what you're trying to do. Because everytime you close and reopen your browser, it uses a different source port to connect to squid.
Other things to try if the above does not work:
You can use a smaller timeout (e.g. -t 60), so the session timeouts sooner (every minute). But in this case if the user stays idle for a min. it will be presented with the agreement page, when he tries to use the browser again.
Hi,
I tried using %SRCPORT instead of %SRC, when I open a browser the webpage comes up, but I cannot navigate away from it. I don't want to authenticate users to login. I just want the webpage to come up every 30 minutes, I tried changing the -t 60, but when I was surfing, it seemed to never go back to agreement page. After a certain amount of just leaving the computer, I get the agreement page. Does this mean the computer needs to be idle for 1 minute before squid will show the webpage? I keep looking at the manpage, but just not getting it.
Does this mean the computer needs to be idle for 1 minute before squid will show the webpage?
From what I can understand from the squid_session manpage, this is what the timeout is. If the user stays idle for the timeout period the session expires and he will be presented with the agreement page. Else if he uses his browser continuously, he won't see the agreement page again, because the session is not expiring.
If you want the page to come up every 30min, I guess you have to reload squid through a cronjob every 30min. Nasty solution but I cannot see another alternative.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.