diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2004-12-14 19:08:09 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2004-12-14 19:08:09 +0000 |
commit | fa8869dad5471ef5981774cc57daf2a99bd11927 (patch) | |
tree | feb1c6f8f1c9b51a0ca8eb954cfc880d6ae133a3 /usr.sbin/httpd | |
parent | b8a09c540ff15376e18ac6082748b8ff84f47409 (diff) |
convert to mdoc;
Diffstat (limited to 'usr.sbin/httpd')
-rw-r--r-- | usr.sbin/httpd/src/support/dbmmanage.1 | 234 |
1 files changed, 128 insertions, 106 deletions
diff --git a/usr.sbin/httpd/src/support/dbmmanage.1 b/usr.sbin/httpd/src/support/dbmmanage.1 index 4320598577e..26721dc3926 100644 --- a/usr.sbin/httpd/src/support/dbmmanage.1 +++ b/usr.sbin/httpd/src/support/dbmmanage.1 @@ -1,4 +1,5 @@ -.TH dbmmanage 1 "March 1998" +.\" $OpenBSD: dbmmanage.1,v 1.9 2004/12/14 19:08:08 jmc Exp $ +.\" .\" ==================================================================== .\" The Apache Software License, Version 1.1 .\" @@ -56,121 +57,142 @@ .\" originally written at the National Center for Supercomputing Applications, .\" University of Illinois, Urbana-Champaign. .\" -.SH NAME -dbmmanage \- Create and update user authentication files in DBM format -.SH SYNOPSIS -.B dbmmanage -.I filename -[ -.I command -] [ -.I username -[ -.I encpasswd -] ] -.PP -.SH DESCRIPTION -.B dbmmanage +.Dd December 14, 2004 +.Dt DBMMANAGE 1 +.Os +.Sh NAME +.Nm dbmmanage +.Nd create and update user authentication files in DBM format +.Sh SYNOPSIS +.Nm +.Ar filename +.Op Ar command +.Op Ar username Op Ar encpassword +.Sh DESCRIPTION +.Nm is used to create and update the DBM format files used to store -usernames and password for basic authentication of HTTP users. +usernames and passwords for basic authentication of HTTP users. Resources available from the -.B httpd +.Xr httpd 8 Apache web server can be restricted to just the users listed -in the files created by -.B dbmmanage. -This program can only be used -when the usernames are stored in a DBM file. To use a -flat-file database see -\fBhtpasswd\fP. -.PP -This manual page only lists the command line arguments. For details of -the directives necessary to configure user authentication in -.B httpd +in the files created by +.Nm . +This program can only be used when the usernames are stored in a DBM file. +To use a flat-file database see +.Xr htpasswd 1 . +.Pp +This manual page only lists the command line arguments. +For details of the directives necessary to configure user authentication in +.Xr httpd 8 , see -the Apache manual, which is part of the Apache distribution or can be -found at http://httpd.apache.org/. -.SH OPTIONS -.IP \fB\fIfilename\fP -The filename of the DBM format file. Usually without the -extension .db, .pag, or .dir. -.IP \fB\fIcommand\fP +the Apache manual, which can be found in +.Pa /var/www/htdocs/manual/ . +.Pp +The options are as follows: +.Bl -tag -width "encpasswordXX" +.It Ar command This selects the operation to perform: -.TP 12 -.B add -Adds an entry for \fIusername\fP to \fIfilename\fP using the encrypted -password \fIencpassword\fP. -.TP 12 -.B adduser -Asks for a password and then adds an entry for \fIusername\fP to -\fIfilename\fP . -.TP 12 -.B check -Asks for a password and then checks if -\fIusername\fP is in \fIfilename\fP and if its password matches -the specified one. -.TP 12 -.B delete -Deletes the \fIusername\fP entry from \fIfilename\fP. -.TP 12 -.B import -Reads username:password entries (one per line) from STDIN and adds them to -\fIfilename\fP. The password already has to be crypted. -.TP 12 -.B update -Same as the "adduser" command, except that it makes sure \fIusername\fP -already exists in \fIfilename\fP. -.TP 12 -.B view -Just displays the complete contents of the DBM file. -.IP \fB\fIusername\fP +.Bl -tag -width "adduserXX" +.It Ic add +Add an entry for +.Ar username +to +.Ar filename +using the encrypted password +.Ar encpassword . +.It Ic adduser +Ask for a password and then add an entry for +.Ar username +to +.Ar filename . +.It Ic check +Ask for a password and then check if +.Ar username +is in +.Ar filename +and if its password matches the specified one. +.It Ic delete +Delete the +.Ar username +entry from +.Ar filename . +.It Ic import +Read username:password entries (one per line) from stdin and add them to +.Ar filename . +The password already has to be encrypted. +.It Ic update +Same as the +.Ic adduser +command, except that it makes sure +.Ar username +already exists in +.Ar filename . +.It Ic view +Just display the complete contents of the DBM file. +.El +.It Ar encpassword +The password to be encrypted. +.It Ar filename +The filename of the DBM format file. +Usually without the extension .db, .pag, or .dir. +.It Ar username The user for which the update operation is performed. -.PD -.SH BUGS -.PP +.El +.Sh SEE ALSO +.Xr htdigest 1 , +.Xr htpasswd 1 , +.Xr httpd 8 +.Sh BUGS One should be aware that there are a number of different DBM file formats in existence, and with all likelihood, libraries for more than -one format may exist on your system. The three primary examples are -NDBM, the GNU project's GDBM, and Berkeley DB 2. Unfortunately, all -these libraries use different file formats, and you must make sure -that the file format used by -.I filename -is the same format that -.B dbmmanage -expects to see. -.B dbmmanage +one format may exist on your system. +The three primary examples are NDBM, the GNU project's GDBM, +and Berkeley DB 2. +Unfortunately, all these libraries use different file formats, +and you must make sure that the file format used by +.Ar filename +is the same format that +.Nm +expects to see. +.Nm currently has no way of determining what type of DBM file it is -looking at. If used against the wrong format, -.B dbmmanage +looking at. +If used against the wrong format, +.Nm will simply return nothing, or may create a different DBM file with a different name, or at worst, it may corrupt the DBM file if you were attempting to write to it. -.PP -.B dbmmanage -has a list of DBM format preferences, defined by the -.B @AnyDBM::ISA -array near the beginning of the program. Since we prefer the Berkeley -DB 2 file format, the order in which -.B dbmmanage -will look for system libraries is Berkeley DB 2, then NDBM, and then -GDBM. The first library found will be the library -.B dbmmanage -will attempt to use for all DBM file transactions. This ordering is -slightly different than the standard -.B @AnyDBM::ISA -ordering in perl, as well as the ordering used by the simple dbmopen() -call in Perl, so if you use any other utilities to manage your DBM -files, they must also follow this preference ordering. Similar care -must be taken if using programs in other languages, like C, to -access these files. -.PP -Apache's -.B mod_auth_db.c +.Pp +.Nm +has a list of DBM format preferences, defined by the +.Dq @AnyDBM::ISA +array near the beginning of the program. +Since we prefer the Berkeley DB 2 file format, the order in which +.Nm +will look for system libraries is Berkeley DB 2, then NDBM, and then GDBM. +The first library found will be the library +.Nm +will attempt to use for all DBM file transactions. +This ordering is slightly different than the standard +.Dq @AnyDBM::ISA +ordering in +.Xr perl 1 , +as well as the ordering used by the simple +.Fn dbmopen +call in perl, +so if you use any other utilities to manage your DBM files, +they must also follow this preference ordering. +Similar care must be taken if using programs in other languages, +like C, +to access these files. +.Pp +.Xr httpd 8 Ns 's +.Pa mod_auth_db.c module corresponds to the Berkeley DB 2 library, while -.B mod_auth_dbm.c -corresponds to the NDBM library. Also, one can usually use the -.B file -program supplied with most Unix systems to see what format a DBM file is in. -.PD -.SH SEE ALSO -.BR httpd(8) -. +.Pa mod_auth_dbm.c +corresponds to the NDBM library. +Also, one can usually use the +.Xr file 1 +program supplied with most +.Ux +systems to see what format a DBM file is in. |