userdb.html.in
上传用户:s81996212
上传日期:2007-01-04
资源大小:722k
文件大小:6k
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
- "http://www.w3.org/TR/REC-html40/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html">
- <title>userdb - manipulate @userdb@</title>
- <!-- $Id: userdb.html.in,v 1.7 2000/03/06 17:41:12 mrsam Exp $ -->
- <!-- Copyright 1998 - 1999 Double Precision, Inc. See COPYING for -->
- <!-- distribution information. -->
- <!-- SECTION 8 -->
- </head>
- <body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B"
- alink="#FF0000">
- <h1>userdb - manipulate @userdb@</h1>
- <h2>SYNOPSIS</h2>
- <pre>userdb <i>addr</i> set <i>field</i>=<i>value</i> <i>field</i>=<i>value</i>...
- userdb <i>addr</i> unset <i>field</i> <i>field</i>...
- userdb <i>addr</i> del
- userdb <i>path/addr</i> (set | unset | del) ...
- userdb -f <i>file</i> <i>addr</i> (set | unset | del) ...
- userdb -show <i>path</i>
- userdb -show <i>path</i> <i>addr</i>
- userdb -show -f <i>file</i>
- userdb -show -f <i>file</i> <i>addr</i></pre>
- <br>
- <h2>DESCRIPTION</h2>
- <p>The <code>userdb</code> command is a convenient script to individually
- manipulate entries in <code>@userdb@</code>. See <a
- href="makeuserdb.html">makeuserdb(8)</a> for a description of its contents.
- <code>@userdb@</code> can always be edited using any text editor, the
- <code>userdb</code> command allows a convenient way to modify this file from
- another script.</p>
- <p><code>@userdb@</code> can also be a subdirectory, instead of a file.
- Specify <i>foo/bar/addr</i> to manipulate <i>addr</i> in the file
- <code>@userdb@/<i>foo/bar</i></code>. You can also use the -f flag: <i>-f
- @userdb@/foo/bar</i> is equivalent. Use whatever form makes the most sense to
- you.</p>
- <p><code>@userdb@</code> 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).</p>
- <p>Each line in <code>@userdb@</code> takes following form:<br>
- <br>
- </p>
- <pre><i>addr</i><TAB><i>field</i>=<i>value</i>|<i>field</i>=<i>value</i>...</pre>
- <p><i>addr</i> specifies a unique virtual address. It is followed by a single
- tab character, then a list of <i>field</i>=<i>value</i> pairs, separated by
- vertical slash characters. See <a href="makeuserdb.html">makeuserdb(8)</a> for
- definitions of fields.</p>
- <p>A text editor can be used to add blank lines or comments in
- <code>@userdb@</code>. Any blank lines or comments are ignored by the
- <code>userdb</code> script.</p>
- <p>The names of the actual fields, and their contents, are defined entirely by
- applications that use the <code>@userdb@</code> database, the
- <code>userdb</code> command just adds or removes arbitrary fields.</p>
- <p>For example:<br>
- <br>
- </p>
- <pre>userdb default/info set mail=/home/mail/info<br>
- </pre>
- <p>This command accesses the address "<i>info</i>" in
- <code>@userdb@/default</code>.</p>
- <p>If the second argument to <code>userdb</code> is "<i>set</i>", the
- remaining arguments are taken as <i>field</i>=<i>value</i> pairs, which are
- added to the record for <i>addr</i>. If there is no record for <i>addr</i>, a
- new record will be appended to the file. If <i>addr</i> exists, any existing
- values of any specified fields are removed. If <i>=value</i> is missing,
- <code>userdb</code> 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 ps(1) command. If <code>userdb</code> is being
- executed by a script, the value can be provided on standard input.</p>
- <p>Use "<i>unset</i>" to delete fields from an existing record. Use
- "<i>del</i>" to delete all fields in the existing record, plus the record
- itself.</p>
- <h2>DISPLAYING @userdb@</h2>
- <p>If the first argument to userdb is <code>-show</code>, <code>userdb</code>
- displays the contents of <code>@userdb@</code>. If <code>@userdb@</code> is a
- subdirectory path must refer to a specific file in <code>@userdb@</code>. The
- -f option can be used instead of <code>path</code> in order to specify an
- arbitrary file.</p>
- <p>If <code>addr</code> is not specified, userdb produces a list, on standard
- output, containing all addresses found in the file, on per line. If
- <code>addr</code> is specified, userdb produces a list, on standard output, of
- all the fields in the record for this <code>addr</code>.</p>
- <h2>REBUILDING @userdb@.dat</h2>
- <p>The actual virtual account/address database is <code>@userdb@.dat</code>.
- This is a binary database file. <code>@userdb@</code> is the plain text
- version. After running <i>userdb</i>, execute the <a
- href="makeuserdb.html">makeuserdb(8)</a> command to rebuild
- <code>@userdb@.dat</code> and have any changes take effect.</p>
- <h2>BUGS</h2>
- <p><i>addr</i> must be unique. When <code>@userdb@</code> is a subdirectory,
- it's possible to create the same <i>addr</i> in different files in this
- subdirectory. This is an error that is not currently detected. Only one of the
- duplicate entries will take effect after executing <a
- href="makeuserdb.html">makeuserdb(8)</a>. Each time <a
- href="makeuserdb.html">makeuserdb(8)</a> is executed a different duplicate
- entry may become the active one.</p>
- <h2>FILES</h2>
- <ul>
- <li><code>@userdb@</code> - plain text file, or directory of plain text
- files<br>
- <br>
- </li>
- <li><code>.lock.filename</code> - lock file for <code>filename<br>
- <br>
- </code></li>
- <li><code>.tmp.filename</code> - temporary file used to create new contents
- of <code>filename</code></li>
- </ul>
- <h2>SEE ALSO</h2>
- <a href="makeuserdb.html">makeuserdb(8)</a>, <a
- href="userdbpw.html">userdbpw(8)</a></body>
- </html>