1 .\" <!-- $Id: userdb.sgml,v 1.5 2007/04/22 15:05:16 mrsam Exp $ -->
2 .\" <!-- Copyright 1998 - 2007 Double Precision, Inc. See COPYING for -->
3 .\" <!-- distribution information. -->
6 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
8 .\" Manual: Double Precision, Inc.
9 .\" Source: Double Precision, Inc.
11 .TH "USERDB" "8" "08/23/2008" "Double Precision, Inc." "Double Precision, Inc."
12 .\" disable hyphenation
14 .\" disable justification (adjust text to left margin only)
17 userdb - manipulate @userdb@
20 \fBuserdb\fR {\fIaddr\fR} set {\fIfield\fR=\fIvalue\fR...}
22 \fBuserdb\fR {\fIaddr\fR} unset {\fIfield\fR...}
24 \fBuserdb\fR {\fIaddr\fR} del
26 \fBuserdb\fR {\fIpath/addr\fR} [set | unset | del] \.\.\.
28 \fBuserdb\fR \-f {\fIfile\fR} {\fIadr\fR} [set | unset | del] \.\.\.
30 \fBuserdb\fR \-show {\fIpath\fR}
32 \fBuserdb\fR \-show {\fIpath\fR} {\fIaddr\fR}
34 \fBuserdb\fR \-show \-f {\fIfile\fR}
36 \fBuserdb\fR \-show \-f {\fIfile\fR} {\fIaddr\fR}
41 is a convenient script to individually manipulate entries in
43 \fI\fBmakeuserdb\fR(8)\fR\&[1]
44 for a description of its contents\.
46 can always be edited using any text editor, but
48 is a convenient way to modify this file from another script\.
52 can also be a subdirectory, instead of a file\. Specify
53 \fB\fIfoo/bar/addr\fR\fR
57 \fI@userdb@\fR\fI\fI/foo/bar\fR\fR\. You can also use the
60 \fB\-f \fR\fB\fI@userdb@/foo/bar\fR\fR
61 is equivalent\. Use whatever form makes the most sense to you\.
65 must not have any group or world permissions\. That\'s because its contents may include system passwords (depending upon the application which uses this virtual user account database)\.
70 .PP \fIaddr\fR<TAB>\fIfield\fR=\fIvalue\fR|\fIfield\fR=\fIvalue\fR\.\.\.
74 specifies a unique virtual address\. It is followed by a single tab character, then a list of
75 \fIfield\fR=\fIvalue\fR
76 pairs, separated by vertical slash characters\. See
77 \fI\fBmakeuserdb\fR(8)\fR\&[1]
78 for field definitions\.
80 A text editor can be used to add blank lines or comments in
81 \fI@userdb@\fR\. Any blank lines or comments are ignored by the
85 The names of the actual fields, and their contents, are defined entirely by applications that use the
89 command just adds or removes arbitrary fields\.
95 \fBuserdb default/info set mail=/home/mail/info\fR
99 This command accesses the address "info" in
100 \fI@userdb@/default\fR\.
102 If the second argument to
104 is "\fIset\fR", the remaining arguments are taken as
105 \fI\fIfield\fR\fR\fI=\fR\fI\fIvalue\fR\fR
106 pairs, which are added to the record for
107 \fIaddr\fR\. If there is no record for
108 \fIaddr\fR, a new record will be appended to the file\. If
110 exists, any existing values of any specified fields are removed\. If
111 \fI=\fR\fI\fIvalue\fR\fR
114 stops and prompts for it\. This is useful if you\'re setting a password field, where you do not want to specify the password on the command line, which can be seen by the
118 is being executed by a script, the value can be provided on standard input\.
120 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\.
121 .SS "DISPLAYING \fI@userdb@\fR"
123 If the first argument to userdb is
126 displays the contents of
131 must refer to a specific file in
134 option can be used instead of
136 in order to specify an arbitrary file\.
142 produces a list, on standard output, containing all addresses found in the file, on per line\. If
146 produces a list, on standard output, of all the fields in
150 .SS "REBUILDING \fI@userdb@\.dat\fR"
152 The actual virtual account/address database is
153 \fI@userdb@\.dat\fR\. This is a binary database file\.
155 is the plain text version\. After running
156 \fBuserdb\fR, execute the
157 \fI\fBmakeuserdb\fR(8)\fR\&[1]
160 for the changes to take effect\.
167 is a subdirectory, it\'s possible to create the same
169 in different files in the subdirectory\. This is an error that is not currently detected by
170 \fBuserdb\fR, however the subsequent
171 \fI\fBmakeuserdb\fR(8)\fR\&[1]
172 command will fail with an error message\.
177 \- plain text file, or directory of plain text files
180 \fI \.lock\.filename\fR
185 \fI \.tmp\.filename\fR
186 \- temporary file used to create new contents of
191 \fI\fBmakeuserdb\fR(8)\fR\&[1],
192 \fI\fBuserdbpw\fR(8)\fR\&[2]