Merge branch 'debian'
[hcoop/debian/courier-authlib.git] / userdb / userdb.8.in
CommitLineData
b0322a85 1'\" t
d9898ee8 2.\" <!-- Copyright 1998 - 2007 Double Precision, Inc. See COPYING for -->
3.\" <!-- distribution information. -->
4.\" Title: userdb
b0322a85
CE
5.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
6.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
7.\" Date: 08/25/2013
d9898ee8 8.\" Manual: Double Precision, Inc.
9.\" Source: Double Precision, Inc.
b0322a85 10.\" Language: English
d9898ee8 11.\"
b0322a85
CE
12.TH "USERDB" "8" "08/25/2013" "Double Precision, Inc." "Double Precision, Inc."
13.\" -----------------------------------------------------------------
14.\" * Define some portability stuff
15.\" -----------------------------------------------------------------
16.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17.\" http://bugs.debian.org/507673
18.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
19.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20.ie \n(.g .ds Aq \(aq
21.el .ds Aq '
22.\" -----------------------------------------------------------------
23.\" * set default formatting
24.\" -----------------------------------------------------------------
d9898ee8 25.\" disable hyphenation
26.nh
27.\" disable justification (adjust text to left margin only)
28.ad l
b0322a85
CE
29.\" -----------------------------------------------------------------
30.\" * MAIN CONTENT STARTS HERE *
31.\" -----------------------------------------------------------------
d9898ee8 32.SH "NAME"
b0322a85 33userdb \- manipulate @userdb@
d9898ee8 34.SH "SYNOPSIS"
b0322a85 35.HP \w'\fBuserdb\fR\ 'u
d9898ee8 36\fBuserdb\fR {\fIaddr\fR} set {\fIfield\fR=\fIvalue\fR...}
b0322a85 37.HP \w'\fBuserdb\fR\ 'u
d9898ee8 38\fBuserdb\fR {\fIaddr\fR} unset {\fIfield\fR...}
b0322a85 39.HP \w'\fBuserdb\fR\ 'u
d9898ee8 40\fBuserdb\fR {\fIaddr\fR} del
b0322a85
CE
41.HP \w'\fBuserdb\fR\ 'u
42\fBuserdb\fR {\fIpath/addr\fR} [set | unset | del] \&.\&.\&.
43.HP \w'\fBuserdb\fR\ 'u
44\fBuserdb\fR \-f {\fIfile\fR} {\fIadr\fR} [set | unset | del] \&.\&.\&.
45.HP \w'\fBuserdb\fR\ 'u
d9898ee8 46\fBuserdb\fR \-show {\fIpath\fR}
b0322a85 47.HP \w'\fBuserdb\fR\ 'u
d9898ee8 48\fBuserdb\fR \-show {\fIpath\fR} {\fIaddr\fR}
b0322a85 49.HP \w'\fBuserdb\fR\ 'u
d9898ee8 50\fBuserdb\fR \-show \-f {\fIfile\fR}
b0322a85 51.HP \w'\fBuserdb\fR\ 'u
d9898ee8 52\fBuserdb\fR \-show \-f {\fIfile\fR} {\fIaddr\fR}
53.SH "DESCRIPTION"
54.PP
d9898ee8 55\fBuserdb\fR
56is a convenient script to individually manipulate entries in
b0322a85
CE
57@userdb@\&. See
58\m[blue]\fB\fBmakeuserdb\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2
59for a description of its contents\&.
60@userdb@
d9898ee8 61can always be edited using any text editor, but
62\fBuserdb\fR
b0322a85 63is a convenient way to modify this file from another script\&.
d9898ee8 64.PP
b0322a85
CE
65@userdb@
66can also be a subdirectory, instead of a file\&. Specify
d9898ee8 67\fB\fIfoo/bar/addr\fR\fR
68to manipulate
69\fB\fIaddr\fR\fR
70in the file
b0322a85 71@userdb@\fI/foo/bar\fR\&. You can also use the
d9898ee8 72\fB\-f\fR
73flag:
74\fB\-f \fR\fB\fI@userdb@/foo/bar\fR\fR
b0322a85 75is equivalent\&. Use whatever form makes the most sense to you\&.
d9898ee8 76.PP
b0322a85
CE
77@userdb@
78must not have any group or world permissions\&. That\*(Aqs because its contents may include system passwords (depending upon the application which uses this virtual user account database)\&.
d9898ee8 79.PP
80Each line in
b0322a85 81@userdb@
d9898ee8 82takes following form:
d9898ee8 83
b0322a85
CE
84\fIaddr\fR<TAB>\fIfield\fR=\fIvalue\fR|\fIfield\fR=\fIvalue\fR\&.\&.\&.
85.PP
d9898ee8 86\fIaddr\fR
b0322a85 87specifies a unique virtual address\&. It is followed by a single tab character, then a list of
d9898ee8 88\fIfield\fR=\fIvalue\fR
b0322a85
CE
89pairs, separated by vertical slash characters\&. See
90\m[blue]\fB\fBmakeuserdb\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2
91for field definitions\&.
d9898ee8 92.PP
93A text editor can be used to add blank lines or comments in
b0322a85 94@userdb@\&. Any blank lines or comments are ignored by the
d9898ee8 95\fBuserdb\fR
b0322a85 96script\&.
d9898ee8 97.PP
98The names of the actual fields, and their contents, are defined entirely by applications that use the
b0322a85 99@userdb@
d9898ee8 100database, the
101\fBuserdb\fR
b0322a85 102command just adds or removes arbitrary fields\&.
d9898ee8 103.PP
104For example:
105.sp
b0322a85 106.if n \{\
d9898ee8 107.RS 4
b0322a85 108.\}
d9898ee8 109.nf
110\fBuserdb default/info set mail=/home/mail/info\fR
111.fi
b0322a85 112.if n \{\
d9898ee8 113.RE
b0322a85 114.\}
d9898ee8 115.PP
116This command accesses the address "info" in
b0322a85 117@userdb@/default\&.
d9898ee8 118.PP
119If the second argument to
120\fBuserdb\fR
121is "\fIset\fR", the remaining arguments are taken as
122\fI\fIfield\fR\fR\fI=\fR\fI\fIvalue\fR\fR
123pairs, which are added to the record for
b0322a85
CE
124\fIaddr\fR\&. If there is no record for
125\fIaddr\fR, a new record will be appended to the file\&. If
d9898ee8 126\fIaddr\fR
b0322a85 127exists, any existing values of any specified fields are removed\&. If
d9898ee8 128\fI=\fR\fI\fIvalue\fR\fR
129is missing,
130\fBuserdb\fR
b0322a85 131stops and prompts for it\&. This is useful if you\*(Aqre setting a password field, where you do not want to specify the password on the command line, which can be seen by the
d9898ee8 132\fBps\fR(1)
b0322a85 133command\&. If
d9898ee8 134\fBuserdb\fR
b0322a85 135is being executed by a script, the value can be provided on standard input\&.
d9898ee8 136.PP
b0322a85
CE
137Use "\fIunset\fR" to delete fields from an existing record\&. Use "\fIdel\fR" to delete all fields in the existing record, plus the record itself\&.
138.SS "DISPLAYING @userdb@"
d9898ee8 139.PP
140If the first argument to userdb is
141\fI\-show\fR,
142\fBuserdb\fR
143displays the contents of
b0322a85
CE
144@userdb@\&. If
145@userdb@
d9898ee8 146is a subdirectory,
147\fI\fIpath\fR\fR
148must refer to a specific file in
b0322a85 149@userdb@\&. The
d9898ee8 150\fI\-f\fR
151option can be used instead of
152\fI\fIpath\fR\fR
b0322a85 153in order to specify an arbitrary file\&.
d9898ee8 154.PP
155If
156\fI\fIaddr\fR\fR
157is not specified,
158\fBuserdb\fR
b0322a85 159produces a list, on standard output, containing all addresses found in the file, on per line\&. If
d9898ee8 160\fI\fIaddr\fR\fR
161is specified,
162\fBuserdb\fR
163produces a list, on standard output, of all the fields in
b0322a85 164@userdb@
d9898ee8 165for this
b0322a85
CE
166\fI\fIaddr\fR\fR\&.
167.SS "REBUILDING @userdb@\&.dat"
d9898ee8 168.PP
169The actual virtual account/address database is
b0322a85 170@userdb@\&.dat\&. This is a binary database file\&.
d9898ee8 171\fB@userdb@\fR
b0322a85 172is the plain text version\&. After running
d9898ee8 173\fBuserdb\fR, execute the
b0322a85 174\m[blue]\fB\fBmakeuserdb\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2
d9898ee8 175command to rebuild
b0322a85
CE
176@userdb@\&.dat
177for the changes to take effect\&.
d9898ee8 178.SH "BUGS"
179.PP
d9898ee8 180\fI\fIaddr\fR\fR
b0322a85
CE
181must be unique\&. If
182@userdb@
183is a subdirectory, it\*(Aqs possible to create the same
d9898ee8 184\fI\fIaddr\fR\fR
b0322a85 185in different files in the subdirectory\&. This is an error that is not currently detected by
d9898ee8 186\fBuserdb\fR, however the subsequent
b0322a85
CE
187\m[blue]\fB\fBmakeuserdb\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2
188command will fail with an error message\&.
d9898ee8 189.SH "FILES"
190.PP
b0322a85 191@userdb@
d9898ee8 192\- plain text file, or directory of plain text files
193.PP
b0322a85 194\&.lock\&.filename
d9898ee8 195\- lock file for
b0322a85 196filename
d9898ee8 197.PP
b0322a85 198\&.tmp\&.filename
d9898ee8 199\- temporary file used to create new contents of
b0322a85 200filename
d9898ee8 201.SH "SEE ALSO"
202.PP
b0322a85
CE
203\m[blue]\fB\fBmakeuserdb\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2,
204\m[blue]\fB\fBuserdbpw\fR(8)\fR\m[]\&\s-2\u[2]\d\s+2
8d138742 205.SH "NOTES"
d9898ee8 206.IP " 1." 4
207\fBmakeuserdb\fR(8)
208.RS 4
b0322a85 209\%[set $man.base.url.for.relative.links]/makeuserdb.html
d9898ee8 210.RE
211.IP " 2." 4
212\fBuserdbpw\fR(8)
213.RS 4
b0322a85 214\%[set $man.base.url.for.relative.links]/userdbpw.html
d9898ee8 215.RE