Solved htpasswd utility needed to encrypt password with bcrypt

Hi all,

I have been using radicale CardDAV/CalDAV server on FreeBSD for several years. I wanted to add one more user account, which requires encrypting his password by htpasswd utility using bcrypt encryption, since all other users' passwords are encrypted with this method and work as intended. However, I cannot seem to find a htpasswd utility to accomplish this. When I first set up this server about 4 years ago, I don't remember encountering this problem; but now, the only utility I came across is py38-htpasswd-2019.10.15 via pkg search, which is listed as "Replacement for htpasswd". The other results from the search query is listed below, but I don't think they are usable on CLI:
p5-Apache-Htpasswd-1.9_2 Manage Unix crypt-style password file
p5-Authen-Htpasswd-0.171_1 Perl interface to read and modify Apache .htpasswd files
p5-Catalyst-Plugin-Authentication-Store-Htpasswd-0.020_2 Use .htpasswd with Catalyst
When I use the htpasswd provided by the py38-htpasswd package, I don't think the encrypted password is generated using bcrypt and there seems to be no way to change this behavior. I tried using the encrypted password generated by this utility but trying to login with that generates a "500: Internal server error" message, while other users' passwords continue to work flawlessly.
Any pointers will be greatly appreciated.

Hakan
 
htpasswd that comes with apache seem to work
Code:
[user@host ~]$ pkg info |grep apache24
apache24-2.4.52                Version 2.4.x of Apache web server
[user@host ~]$ htpasswd -B -c /dev/tty testuser
New password:
Re-type new password:
Adding password for user testuser
testuser:$2y$05$ajnoKo5VWI4PNf03cEQheeuD9.Hkq/NHe4P5IZuKfKPRKsQvi6/bq
 
Back
Top