Linux port of the OpenBSD binary modified to work with baremetalDMR's installer.
  • C 85%
  • Roff 13.1%
  • Meson 1.9%
Find a file
2026-07-01 00:22:16 -04:00
COPYING it solves a problem 2026-07-01 00:22:16 -04:00
htpasswd.1 it solves a problem 2026-07-01 00:22:16 -04:00
htpasswd.c it solves a problem 2026-07-01 00:22:16 -04:00
landloc.h it solves a problem 2026-07-01 00:22:16 -04:00
meson.build it solves a problem 2026-07-01 00:22:16 -04:00
README.md it solves a problem 2026-07-01 00:22:16 -04:00

htpasswd-portable

OpenBSD's htpasswd(1) ported to Linux.

Modified from shtrophic's version to add rudimentary support to take -bn as per baremetalDMR installer.

htpasswd is used for baremetalDMR's dashboard login. While some distros have a dedicated package for apache2-utils; others do not. Rather than make users install full apache just for a single binary; just include the binary. This also eliminates the apache2-utils dependency entirely.

Setup

Requires libbsd and nettle.

meson setup builddir --buildtype release
meson install -C builddir

Binaries are distributed in the baremtalDMR installer tarball for your architecture.

Differences from the original

Where applicable, libbsd does the heavy lifting by providing functions that are missing in glibc. The original htpasswd uses crypt_newhash() to create a bcrypt hash of the password with a random salt. This functionality has been ported using nettle's blowfish_bcrypt_hash(). Additionally, bcrypt_autorounds() is included in this port as well, to dynamically set the number of hashing rounds based on the available computing power. The original sandboxing parts using pledge(2) and unveil(2) have been ported to Linux's landlock(7) on a best-effort basis using landloc.h.