LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Squid authentication (https://www.linuxquestions.org/questions/linux-networking-3/squid-authentication-216571/)

gubak 08-12-2004 03:51 AM

Squid authentication
 
I use RedHat9

I find the ncsa_auth and the password files by "Search for Files" mail menu program, and I configured the squid authentication like that:

auth_param basic program /usr/lib/squid/ncsa_auth /etc/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours

acl password proxy_auth REQUIRED
http_access allow password

When I want to use internet by any browser (Internet explorer 6, Konqueror) the authentication program appears. It's ok, but when I type the username and password the authentication program doesn't accept them.

My passwd file is like that:

root:x:0:0:root:/root:/bin/bash
user1:x:503:503:user1:/home/user1:/bin/bash
etc.


Did I forget something or my passwd file is incorrect?

ppuru 08-12-2004 05:14 AM

It appears you are trying to use the /etc/passwd file - the file that is used to authenticate users before they log on to the linux/unix system.

If you want to use this file, I think you need to use getpwam instead of ncsa,

Check this site if you want to use ncsa auth.
http://www.devet.org/squid/proxy_auth/

gubak 08-12-2004 06:49 AM

I've red it already, but this is an old version, and my files take place in other destinations.
The problem is still alive!

ppuru 08-12-2004 07:01 AM

If you want nsca auth, you will need to create a file as per htpasswd specs. If you have apache installed, then you should find htpasswd utility on your system. Create a password file using htpasswd and assign this password file to ncsa_auth

gubak 08-13-2004 12:25 AM

I've found the htpasswd file, and I've seen its contents by kwrite.
I've seen only unknow characters.

How can I create a password file using htpasswd?

ppuru 08-13-2004 12:32 AM

htpasswd is a utility. man htpasswd for usage details

gubak 08-13-2004 01:46 AM

I've made a new pasword file, but the proxy still doesn't allow me to use internet. It seems like authentication program doesn't recognize my password.
Have you any other idea?

ppuru 08-13-2004 01:57 AM

hope you have made the appropriate in squid.conf to use the new password file and reloaded squid.

gubak 08-13-2004 02:13 AM

I've made it, but I've only reconfigured squid (squid -k reconfigure).
I should reload it?

ppuru 08-13-2004 04:46 AM

I am sorry .. I am so used to the service squid reload command

arno 08-13-2004 08:31 AM

If you want to use authentication based an the passwd file you must use getpwam


All times are GMT -5. The time now is 09:23 PM.