To create and manage users, we can use the htpasswd
program, which is a part of httpd
(Apache Web Server).
Let's say we are going to keep the passwords in the /opt/squid/etc/passwd
file, then we can add some users as follows:
htpasswd /opt/squid/etc/passwd saini New password: Re-type new password:
We should enter the password when asked and a combination of a username and encrypted password will be written to the password file. To add more users, we can use the same command.
Now we need to configure the NCSA authentication helper to use this password file. We can do so using the following command:
auth_param basic program /opt/squid/libexec/basic_ncsa_auth /opt/squid/etc/passwd
We learned to add new users to the password file, which is then used by the NCSA authentication helper to validate the credentials provided by the user.