134 Chapter 10. Apache HTTP Server10.2.4.4. The mod_auth_dbm and mod_auth_db ModulesApache HTTP Server 1.3 supported two authentication modules, mod_auth_db and mod_auth_dbm,which used Berkeley Databases and DBM databases respectively. These modules have been com-bined into a single module named mod_auth_dbm in Apache HTTP Server 2.0, which can accessseveral different database formats. To migrate from mod_auth_db, configuration files should be ad-justed by replacing AuthDBUserFile and AuthDBGroupFile with the mod_auth_dbm equivalents:AuthDBMUserFile and AuthDBMGroupFile. Also, the directive AuthDBMType DB must be addedto indicate the type of database file in use.The following example shows a sample mod_auth_db configuration for Apache HTTP Server 1.3:ÇLocation /private/>AuthType BasicAuthName "My Private Files"AuthDBUserFile /var/www/authdbrequire valid-userÇ/Location>To migrate this setting to version 2.0 of Apache HTTP Server, use the following structure:ÇLocation /private/>AuthType BasicAuthName "My Private Files"AuthDBMUserFile /var/www/authdbAuthDBMType DBrequire valid-userÇ/Location>Note that the AuthDBMUserFile directive can also be used in .htaccess files.The dbmmanage Perl script, used to manipulate user name and password databases, has been replacedby htdbm in Apache HTTP Server 2.0. The htdbm program offers equivalent functionality and likemod_auth_dbm can operate a variety of database formats; the -T option can be used on the commandline to specify the format to use.Table 10-1 shows how to migrate from a DBM-format database to htdbm format using dbmmanage.Action dbmmanage command(1.3)Equivalent htdbmcommand (2.0)Add user to database (usinggiven password)dbmmanage authdb addusername passwordhtdbm -b -TDB authdbusername passwordAdd user to database (promptsfor password)dbmmanage authdbadduser usernamehtdbm -TDB authdbusernameRemove user from database dbmmanage authdb deleteusernamehtdbm -x -TDB authdbusernameList users in database dbmmanage authdb view htdbm -l -TDB authdbVerify a password dbmmanage authdb checkusernamehtdbm -v -TDB authdbusernameTable 10-1. Migrating from dbmmanage to htdbmThe -m and -s options work with both dbmmanage and htdbm, enabling the use of the MD5 or SHA1algorithms for hashing passwords, respectively.When creating a new database with htdbm, the -c option must be used.