5. Password file

Next, we need to create the passwd file. We do this by using the htpasswd command (part of the apache httpd package).

  1. Navigate to /etc/squid and type mkdir etc/ then htpasswd -d -c passwd username The output will be:

      
    [root@suretecsystemsproxy squid]#
    htpasswd -d -c passwd username
    New password:
    Re-type new password:
    Adding password for user username
    	    

  2. now, change the file permissions so squid can read it, As root type:

    chown -R squid:squid /etc/squid/etc/passwd
    chmod 600 /etc/squid/etc/passwd
    	    

  3. Issue the command squid -k reconfigure and test. Test by changing the appropriate settings in your favourite browser.

[Tip]Tip

You can debug squid to check everything is working by issuing squid -X. If you are unsure of any options when using any command line tool, always add --help onto the end of it.

You should be presented with the following prompt:


		User prompt using Internet Explorer

Figure 1. User & password popup