Trac on OpenBSD with Basic Auth

Last Update: 2010-02-09

If you are trying to install Trac on OpenBSD with Basic Auth and using tracd and you can't figure out why your passwords are not working, try to generate them using the -m or -d parameter:

$ htpasswd -m -c .htpasswd admin

The version of htpasswd maintained in OpenBSD does not default to MD5 encoded password it uses blowfish while most Linux distributions are shipping with a version using this option by default. This is true at least as of OpenBSD 4.5, here is an extract from htpasswd(1):

htpasswd encrypts passwords using either a version of MD5 modified for
Apache, the system's crypt(3) routine (the default), or SHA encryption.
Files managed by htpasswd may contain all types of passwords e.g. some
user records may have MD5-encrypted passwords while others in the same
file have passwords encrypted with crypt(3).</pre>

A note was added to the Trac documentation

Bertrand Janin <b@janin.com> · Powered by the spirit of the UNIX gods.