DBM files should be used with Radiator if you require fast
authentication, but also need to change your user database on the fly
while Radiator is running, and you do not or cannot use <AuthBy SQL>
or <AuthBy FILE> in Nocache mode.
Radiator will choose the
best format of DBM file available to you, depending on which DBM modules
are installed on your machine.
Tip
You can force it to
choose a particular DBM file format by using the -t flag.
The
arguments are:
builddbm [-z] [-u] [-f flatfile] [-d user] [-l user]
[-p]
[-t type] dbfile
-zThis deletes all entries from the
database before processing other commands.
-uThis updates the mode and replaces user
entries that already exist in the DBM file rather than showing an
error.
-f flatfileThe name of the flat file
format user database to be used to populate the DBM file. The default
value is dbfile, i.e. the name of the DBM file,
without the .pag or .dir
suffixes.
-d userThis deletes the entry for
user from the DBM file.
-l userThis prints out the entry for
user in a format that could be re-imported into
builddbm.
-pThis prints the contents of the DBM file
in standard Livingston flat file format. The check and reply
attributes of all users in the database are printed out in no
particular order. The printed output goes to
stdout.
-t dbmtypeThis forces
builddbm to use a particular format of DBM file.
The value of dbmtype can be AnyDBM_File,
NDBM_File, DB_File, GDBM_File, SDBM_File or ODBM_File. Defaults to
AnyDBM_File, which selects the best format on the host
machine.
dbfileThe base name of the DBM files to
create or use. The actual filenames depend on the DBM module that Perl
has selected, but, it is usually something like
dbfile.dir and dbfile.pag.
This is a mandatory parameter.
Example
Rebuild the entire DBM database in
users.dir and users.pag from the
users file, clearing old entries first:
builddbm -z users
Example
Update the Berkeley DB format database files
all.db with the users in the file
users:
builddbm -u -f users -t DB_File all.db
Example
Print the entry associated with the user
mikem in the DBM files
staff.dir,
staff.pag:
builddbm -l mikem staff