3.36. <AuthBy DBFILE>

AuthBy DBFILE authenticates users from a user database stored in a DBM file in the standard Merit DBM format. It is implemented in AuthDBFILE.pm. It does not log (but does reply to) accounting requests. For more information about file formats, see Section 9.3. DBM user database. DBM files can be built from flat file user databases with the builddbm utility. For more information about builddbm, see Section 6.2. builddbm.
AuthBy DBFILE opens and reads the user database for every authentication. This means that if you change the user database DBM file, it will have an immediate effect. The DBM file is not locked when it is accessed.
When attempting to authenticate a user, AuthBy DBFILE will first compare all the check items associated with the user in the same way as <AuthBy FILE>. For more information, see Section 3.35. <AuthBy FILE>. If all those match the attributes in the Access-Request message, AuthBy DBFILE will reply with an Access-Accept message containing all the attributes given as reply attributes in the user database. If the user does not appear in the database, or if any check attribute does not match, an Access-Reject message is sent to the client.
<AuthBy DBFILE> understands also the same parameters as <AuthBy xxxxxx>. For more information, see Section 3.32. <AuthBy xxxxxx>.

3.36.1. Filename

Specifies the filename that holds the user database. Defaults to %D/users, i.e. files named users.dir and users.pag in DbDir. The file name can include special formatting characters. For more information, see Section 3.3. Special formatters. Depending on the actual DBM module that Perl chooses, the database files may have other extensions.
# user database is called rad_users in DbDir
Filename %D/rad_users

3.36.2. DBType

By default, Radiator and Perl will choose the ‘best’ format of DBM file available to you, depending on which DBM modules are installed on your machine. You can override this choice by specifying DBType as the name of one of the DBM formats supported on your platform. The typical choices are:
  • AnyDBM_File
  • NDBM_File
  • DB_File
  • GDBM_File
  • SDBM_File
  • ODBM_File
but not may be available on your platform. The default is AnyDBM_File, which chooses the best available implementation.
# Force it to use DB_File
DBType DB_File
If you alter this, you will probably have to use the -t flag set to the same type on builddbm to force it to build a compatible database.