2 .\" <!-- Copyright 1998 - 2007 Double Precision, Inc. See COPYING for -->
3 .\" <!-- distribution information. -->
5 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
6 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
8 .\" Manual: Double Precision, Inc.
9 .\" Source: Double Precision, Inc.
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 .\" -----------------------------------------------------------------
23 .\" * set default formatting
24 .\" -----------------------------------------------------------------
25 .\" disable hyphenation
27 .\" disable justification (adjust text to left margin only)
29 .\" -----------------------------------------------------------------
30 .\" * MAIN CONTENT STARTS HERE *
31 .\" -----------------------------------------------------------------
33 userdb \- manipulate @userdb@
35 .HP \w'\fBuserdb\fR\ 'u
36 \fBuserdb\fR {\fIaddr\fR} set {\fIfield\fR=\fIvalue\fR...}
37 .HP \w'\fBuserdb\fR\ 'u
38 \fBuserdb\fR {\fIaddr\fR} unset {\fIfield\fR...}
39 .HP \w'\fBuserdb\fR\ 'u
40 \fBuserdb\fR {\fIaddr\fR} del
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
46 \fBuserdb\fR \-show {\fIpath\fR}
47 .HP \w'\fBuserdb\fR\ 'u
48 \fBuserdb\fR \-show {\fIpath\fR} {\fIaddr\fR}
49 .HP \w'\fBuserdb\fR\ 'u
50 \fBuserdb\fR \-show \-f {\fIfile\fR}
51 .HP \w'\fBuserdb\fR\ 'u
52 \fBuserdb\fR \-show \-f {\fIfile\fR} {\fIaddr\fR}
56 is a convenient script to individually manipulate entries in
58 \m[blue]\fB\fBmakeuserdb\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2
59 for a description of its contents\&.
61 can always be edited using any text editor, but
63 is a convenient way to modify this file from another script\&.
66 can also be a subdirectory, instead of a file\&. Specify
67 \fB\fIfoo/bar/addr\fR\fR
71 @userdb@\fI/foo/bar\fR\&. You can also use the
74 \fB\-f \fR\fB\fI@userdb@/foo/bar\fR\fR
75 is equivalent\&. Use whatever form makes the most sense to you\&.
78 must 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)\&.
84 \fIaddr\fR<TAB>\fIfield\fR=\fIvalue\fR|\fIfield\fR=\fIvalue\fR\&.\&.\&.
87 specifies a unique virtual address\&. It is followed by a single tab character, then a list of
88 \fIfield\fR=\fIvalue\fR
89 pairs, separated by vertical slash characters\&. See
90 \m[blue]\fB\fBmakeuserdb\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2
91 for field definitions\&.
93 A text editor can be used to add blank lines or comments in
94 @userdb@\&. Any blank lines or comments are ignored by the
98 The names of the actual fields, and their contents, are defined entirely by applications that use the
102 command just adds or removes arbitrary fields\&.
110 \fBuserdb default/info set mail=/home/mail/info\fR
116 This command accesses the address "info" in
119 If the second argument to
121 is "\fIset\fR", the remaining arguments are taken as
122 \fI\fIfield\fR\fR\fI=\fR\fI\fIvalue\fR\fR
123 pairs, which are added to the record for
124 \fIaddr\fR\&. If there is no record for
125 \fIaddr\fR, a new record will be appended to the file\&. If
127 exists, any existing values of any specified fields are removed\&. If
128 \fI=\fR\fI\fIvalue\fR\fR
131 stops 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
135 is being executed by a script, the value can be provided on standard input\&.
137 Use "\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@"
140 If the first argument to userdb is
143 displays the contents of
148 must refer to a specific file in
151 option can be used instead of
153 in order to specify an arbitrary file\&.
159 produces a list, on standard output, containing all addresses found in the file, on per line\&. If
163 produces a list, on standard output, of all the fields in
167 .SS "REBUILDING @userdb@\&.dat"
169 The actual virtual account/address database is
170 @userdb@\&.dat\&. This is a binary database file\&.
172 is the plain text version\&. After running
173 \fBuserdb\fR, execute the
174 \m[blue]\fB\fBmakeuserdb\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2
177 for the changes to take effect\&.
183 is a subdirectory, it\*(Aqs possible to create the same
185 in different files in the subdirectory\&. This is an error that is not currently detected by
186 \fBuserdb\fR, however the subsequent
187 \m[blue]\fB\fBmakeuserdb\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2
188 command will fail with an error message\&.
192 \- plain text file, or directory of plain text files
199 \- temporary file used to create new contents of
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
209 \%[set $man.base.url.for.relative.links]/makeuserdb.html
214 \%[set $man.base.url.for.relative.links]/userdbpw.html