# Squid strange auth error

**URL:** <https://forum.virtualmin.com/t/squid-strange-auth-error/132545>\
**Category:** Webmin\
**Created:** [March 13, 2025, 11:45am UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545 "2025-03-13T11:45:11Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [March 13, 2025, 11:45am UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/1 "2025-03-13T11:45:11Z")

</div>

| SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | Debian 12+13 |
| Webmin version | 2.202+2.302 |

Hey,  
using webmin in a kvm vps just to manage squid users. it was working fine for years, after many OS dist-upgrades.  
yesterday, a new squid user added from webmin module, couldn’t use squid at all. another new user added for test, same behavior. changing password on an existing user, the same. 407/authentication issues for those, on logs.  
existing+unchanged users/passwords have no issues at all.

so after hours of searching, and even dist-upgrading OS to get newer squid v6, i think i got something. if password is changed/added from webmin module, it fails. (this is new, happening only during the last days(weeks perhaps? not sure when last succesful user was added…)  
if i manually add/change squid user password using htpasswd, it works fine, no issues.

any ideas/hints why this happens?

squid.conf :

auth\_param basic program /usr/lib/squid/basic\_ncsa\_auth /etc/squid/passwd  
auth\_param basic children 10  
auth\_param basic realm Squid proxy-caching web server  
auth\_param basic credentialsttl 2 hour  
auth\_param basic casesensitive off

acl ncsa\_users proxy\_auth REQUIRED  
http\_access allow ncsa\_users

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [March 13, 2025, 12:40pm UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/2 "2025-03-13T12:40:55Z")

</div>

last working user was created in webmin on 30/1/2025. any user created after that date is failing to authenticate.

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [March 13, 2025, 2:49pm UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/3 "2025-03-13T14:49:06Z")

</div>

well, there was another user created through webmin on 26/2 that is working fine.  
but several other users don’t.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [March 14, 2025, 12:59am UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/4 "2025-03-14T00:59:29Z")

</div>

The Webmin Squid module and htaccess-htpasswd modules haven’t changed in years, so I don’t think it can have anything to do with Webmin.

I don’t remember how passwords are handled in the Squid module, can you be specific about the workflow you use to change or add a password in the Webmin module? (Is it in the Squid module? There is also an htpasswd editor, so I want to be specific about what I’m looking at.)

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [March 14, 2025, 1:11am UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/5 "2025-03-14T01:11:10Z")

</div>

> [@dimitrist](#):
>
> so after hours of searching, and even dist-upgrading OS to get newer squid v6, i think i got something. if password is changed/added from webmin module, it fails. (this is new, happening only during the last days(weeks perhaps?

Are you using the alpha version of Debian 13 (Trixie)?

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [March 14, 2025, 7:52am UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/6 "2025-03-14T07:52:42Z")

</div>

there’s only webmin, running on a KVM VPS, a specific person logs in webmin as root, and goes into Squid module → Proxy Authentication. there, they modify/add proxy users. (~2400 users currently). so, webmin url for user changes/additions is :10000/squid/edit\_nauth.cgi?xnavigation=1

maybe someone can try with a fully upgraded debian 12 system and squid module to see if it’s working ok for them? (add a user, try to login to proxy after. w/ basic auth)

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [March 14, 2025, 7:58am UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/7 "2025-03-14T07:58:57Z")

</div>

we were using debian 12 when error occured. while trying to troubleshoot, i thought i’d give squid v6 a try… so i’ve dist-upgraded to trixie in order to test with newer versions of all packages. (= no luck)  
haven’t reverted to debian 12, still using trixie on this machine. no issues so far, but apart from webmin + squid + apt-cacher-ng , there’s no other services running.

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [March 14, 2025, 8:33am UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/8 "2025-03-14T08:33:11Z")

</div>

ok, i think i found out what’s happening. passwords longer than 8chars don’t work. any password \<8chars is working fine, while longer ones fail. with longer passwords user has to use only first 8chars of the password in order to login. using full password will fail with auth error (407). that’s crypt limitation i think. (?)

running htpasswd , there is no crypt option at all. just md5, sha1, etc… all salted. and squid users created/modified with it can login normally, longer passwords work fine.  
webmin squid module doesn’t add salt to passwords and has this 8char limit.  
we probably noticed just now, because new (2025) users mostly use \>8chars passwords…

btw, if i go to :10000/config.cgi?module=squid&\_cscript=index.cgi&xnavigation=1  
and change **Encryption method for proxy passwords**  
to use other option “md5base64”, i can no longer view Proxy Authentication option in squid module. there’s just an “Error” with blank page.  
miniserv.err :  
/squid/edit\_nauth.cgi : ?  
Argument “” isn’t numeric in array element at /usr/share/webmin/squid/save\_nuser.cgi line 25.  
Argument “” isn’t numeric in array element at /usr/share/webmin/squid/save\_nuser.cgi line 25.  
Argument “” isn’t numeric in array element at /usr/share/webmin/squid/save\_nuser.cgi line 25.

so, keeping this option “crypt”.

anyway, maybe this is better suited as a feature request… ? (=moving to a safer alternative than crypt, modernizing squid module…)

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [March 14, 2025, 12:54pm UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/9 "2025-03-14T12:54:38Z")

</div>

Actually, we’d expect to rely on the system’s hashing method. If passwords are being clipped to 8 characters, that suggests “DES” is being used. At the very least, I’d expect “MD5”, though that’s not ideal either. Modern systems use either “SHA512” or “yescrypt”.

Anyway, try applying this patch and see how it goes:

```auto
webmin patch https://github.com/webmin/webmin/commit/f2307ae

```

I don’t remember exactly how I set this up back when I was using Squid, but I clearly recall running into this issue. I do remember configuring `auth_param basic program`, though I’m not sure off the top of my head if that was the cause.

Anyway, give the patch a try and let me know how it goes.

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [March 14, 2025, 1:14pm UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/10 "2025-03-14T13:14:56Z")

</div>

> [@Ilia](#):
>
> `webmin patch https://github.com/webmin/webmin/commit/f2307ae`

apllied patch :  
~ webmin patch [Fix to stop using MD5 module that was deprecated · webmin/webmin@f2307ae · GitHub](https://github.com/webmin/webmin/commit/f2307ae)  
Patch applied successfully to:  
squid/edit\_nauth.cgi  
squid/save\_nuser.cgi  
squid/useradmin\_update.pl

changed an existing users password but still can login by only using the first 8chars of the new password.  
same with a new user.

( thanks for your time looking into this 🙂 )

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [March 14, 2025, 5:48pm UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/11 "2025-03-14T17:48:28Z")

</div>

> [@dimitrist](#):
>
> a new squid user added from webmin module, couldn’t use squid at all.

Could you explain exactly how you added a new Squid user using Webmin?

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [March 14, 2025, 6:08pm UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/12 "2025-03-14T18:08:23Z")

</div>

Also, I highly recommend replacing basic authentication with digest authentication, as it is more secure—passwords are not sent in plain text, and it uses unique tokens (nonces).

To make this change, replace the first five lines of your current configuration with:

```auto
auth_param digest program /usr/lib/squid/digest_file_auth /etc/squid/passwd
auth_param digest children 10
auth_param digest realm Squid Proxy
auth_param digest nonce_garbage_interval 5 minutes
auth_param digest nonce_max_duration 30 minutes
auth_param digest nonce_max_count 50

```

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [March 17, 2025, 11:01am UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/13 "2025-03-17T11:01:03Z")

</div>

detailed steps :  
go to webmin module : [https://webmin.server:10000/squid/?xnavigation=1](https://webmin.server:10000/squid/?xnavigation=1)  
Choose “Proxy Authentication” [https://webmin.server:10000/squid/edit\_nauth.cgi?xnavigation=1](https://webmin.server:10000/squid/edit_nauth.cgi?xnavigation=1)  
click on top left option “Add a new proxy user” [https://webmin.server:10000/squid/edit\_nuser.cgi?new=1](https://webmin.server:10000/squid/edit_nuser.cgi?new=1)  
add username+password, click Create.

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [March 17, 2025, 1:00pm UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/14 "2025-03-17T13:00:58Z")

</div>

this doesn’t work. if i change squid.conf settings using digest method, all users fail authentication/407. (so, breaking proxy, can’t do)

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [March 18, 2025, 9:05pm UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/15 "2025-03-18T21:05:10Z")

</div>

I don’t think the password file from basic auth is at all compatible with a digest auth configuration. Not sure why Ilia would suggest switching an existing deployment. You’d need to change more than just the Squid auth configuration. All clients also have to be able to support digest auth (not all do, or at least didn’t back when I dealt with proxies).

I’d recommend solving one problem at a time. Basic auth is fine on a local network.

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [May 17, 2025, 9:05pm UTC](https://forum.virtualmin.com/t/squid-strange-auth-error/132545/16 "2025-05-17T21:05:17Z")

</div>

Closed on May 17, 2025, 9:05pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
