Solved: FATAL: Authentication helper program /usr/lib/squid/basic_ncsa_auth: (2) No such file or directory

Are you facing “FATAL: Authentication helper program /usr/lib/squid/basic_ncsa_auth: (2) No such file or directory” error while trying to setup squid proxy server ? Do you want to Know how to solve “FATAL: Authentication helper program /usr/lib/squid/basic_ncsa_auth: (2) No such file or directory” error ? If yes, then you have come to the right place. Even I was facing this error when I was trying to configure squid proxy server. While checking this error I thought to put all the steps in an article so that it will help you guys also if you are facing the same issue.

Solved: FATAL: Authentication helper program /usr/lib/squid/basic_ncsa_auth: (2) No such file or directory 1

 Solved: “FATAL: Authentication helper program /usr/lib/squid/basic_ncsa_auth”

Also Read: How to Install and Configure Squid Proxy Server on RHEL/CentOS 7/8

After setting up the Squid proxy server when I restarted the service using systemctl restart squid command then I noticed below error on the output.

[root@localhost ~]# systemctl restart squid
Job for squid.service failed because the control process exited with error code. See "systemctl status squid.service" and "journalctl -xe" for details.

To understand more about the error which was causing the service failure I tried to check the status by using systemctl status squid -l command as shown below.

[root@localhost ~]# systemctl status squid -lsquid.service - Squid caching proxy
Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2020-10-25 15:46:20 EDT; 12s ago
Process: 14382 ExecStop=/usr/sbin/squid -k shutdown -f $SQUID_CONF (code=exited, status=0/SUCCESS)
Process: 16088 ExecStart=/usr/sbin/squid $SQUID_OPTS -f $SQUID_CONF (code=exited, status=1/FAILURE)
Process: 16083 ExecStartPre=/usr/libexec/squid/cache_swap.sh (code=exited, status=0/SUCCESS)
Main PID: 11680 (code=killed, signal=TERM)

Oct 25 15:46:20 localhost squid[16088]: Authentication helper program /usr/lib/squid/basic_ncsa_auth: (2) No such file or directory
Oct 25 15:46:20 localhost squid[16088]: FATAL: Authentication helper program /usr/lib/squid/basic_ncsa_auth: (2) No such file or directory
Oct 25 15:46:20 localhost squid[16088]: Squid Cache (Version 3.5.20): Terminated abnormally.
Oct 25 15:46:20 localhost squid[16088]: CPU Usage: 0.010 seconds = 0.004 user + 0.006 sys
Oct 25 15:46:20 localhost squid[16088]: Maximum Resident Size: 26880 KB
Oct 25 15:46:20 localhost squid[16088]: Page faults with physical i/o: 0
Oct 25 15:46:20 localhost systemd[1]: squid.service: control process exited, code=exited status=1
Oct 25 15:46:20 localhost systemd[1]: Failed to start Squid caching proxy.
Oct 25 15:46:20 localhost systemd[1]: Unit squid.service entered failed state.
Oct 25 15:46:20 localhost systemd[1]: squid.service failed.

Then I went back to my squid configuration file squid.conf and tried to check all the configuration carefully. After few minutes I noticed that the first line of the configuration does not look correct. In the first line, I have mentioned the authentication program path as /usr/lib/squid/basic_ncsa_auth which is not available in my server. Check more on Squid Official Documentation.

auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwords
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 10 hours
auth_param basic casesensitive off
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
http_access deny all
http_port 9000

In my server, it is available under /usr/lib64/squid/basic_ncsa_auth. So instead of using lib, I was suppose to use lib64 as shown below.

auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwords

Then I again tried to restart the squid service by using same systemctl restart squid command as you can see below. This time it did not thrown any error on the output.

Advertisements
[root@localhost ~]# systemctl restart squid

So I quickly checked the service status using systemctl status squid command and found to be working fine.

[root@localhost ~]# systemctl status squidsquid.service - Squid caching proxy
Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-10-25 15:52:32 EDT; 7s ago
Process: 14382 ExecStop=/usr/sbin/squid -k shutdown -f $SQUID_CONF (code=exited, status=0/SUCCESS)
Process: 16187 ExecStart=/usr/sbin/squid $SQUID_OPTS -f $SQUID_CONF (code=exited, status=0/SUCCESS)
Process: 16182 ExecStartPre=/usr/libexec/squid/cache_swap.sh (code=exited, status=0/SUCCESS)
Main PID: 16189 (squid)
CGroup: /system.slice/squid.service
├─16189 /usr/sbin/squid -f /etc/squid/squid.conf
├─16191 (squid-1) -f /etc/squid/squid.conf
└─16192 (logfile-daemon) /var/log/squid/access.log

Oct 25 15:52:32 localhost systemd[1]: Starting Squid caching proxy...
Oct 25 15:52:32 localhost systemd[1]: Started Squid caching proxy.
Oct 25 15:52:32 localhost squid[16189]: Squid Parent: will start 1 kids
Oct 25 15:52:32 localhost squid[16189]: Squid Parent: (squid-1) process 16191 started

One more scenario which I could think of that can cause "FATAL: Authentication helper program /usr/lib/squid/basic_ncsa_auth: (2) No such file or directory" error is that you might not have squid-helpers package installed in your Server which usually gets installed with squid main package. You can easily install this package by using yum install squid-helpers -y command as shown below.

[root@localhost ~]# yum install squid-helpers -y

 

 

 

 

 

Popular Recommendations:-

11 Best Python OS Module Examples on Linux

How to Install MariaDB 5.5 Server on RHEL/CentOS 7 Linux with Easy Steps

6 Simple Steps to Change/Reset MariaDB root password on RHEL/CentOS 7/8

Best Steps to Install Java on RHEL 8/CentOS 8

5 Examples to Turn Off SELinux Temporarily or Permanently on RHEL 8/CentOS 8

Best Explanation of Wrapper Classes in Java: Autoboxing and Unboxing with Examples

5 Best Ways to Become root user or Superuser in Linux (RHEL/CentOS/Ubuntu)

How to Install PHP on RedHat/CentOS 7 with Easy Steps

Advertisements

Leave a Reply