* Add a footnote.

* Reword several paragraphs for clarity.
* Reorganize the section on modifying accounts --
  Display a table of available account manipulation commands at the
  beginning with a short summary of each, and then use the subsections
  to describe each in greater detail with examples.
This commit is contained in:
Murray Stokely 2001-09-04 11:03:16 +00:00
parent f40223d1d7
commit 30e2d6ae9d
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10575

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/users/chapter.sgml,v 1.27 2001/08/16 18:35:08 chern Exp $
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/users/chapter.sgml,v 1.28 2001/08/22 05:37:50 murray Exp $
-->
<chapter id="users">
@ -23,7 +23,11 @@
<para>FreeBSD allows multiple users to use the computer at the same time.
Obviously, only one of those users can be sat in front of the screen and
keyboard at any one time, but any number of users can log in through the
keyboard at any one time
<footnote>
<para>Well, unless you hook up multiple terminals, but we'll
save that for <xref linkend="serialcomms"></para>
</footnote>, but any number of users can log in through the
network to get their work done. To use the system every user must have
an account.</para>
@ -314,17 +318,48 @@
<primary>accounts</primary>
<secondary>modifying</secondary>
</indexterm>
<para><command>pw</command> is a powerful and flexible
tool to modify all aspects of user accounts. For most tasks
however, <command>adduser</command> and
<command>rmuser</command> are recommended to add and
remove accounts respectively.</para>
<para><command>chpass</command> allows both the system
administrator and normal users to adjust passwords, shells, and
personal information. If you are only interested in changing a
password then the <command>passwd</command> command is
usually quicker.</para>
<para>There are a variety of different commands available in the
Unix environment to manipulate user accounts. The most common
commands are summarized below, followed by more detailed
examples of their usage.</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Command</entry>
<entry>Summary</entry>
</row>
</thead>
<tbody>
<row>
<entry><command>adduser</command></entry>
<entry>The recommended command-line application for adding
new users.</entry>
</row>
<row>
<entry><command>rmuser</command></entry>
<entry>The recommended command-line application for
removing users.</entry>
</row>
<row>
<entry><command>chpass</command></entry>
<entry>A flexible tool to change user database information.</entry>
</row>
<row>
<entry><command>passwd</command></entry>
<entry>The simple command-line tool to change user
passwords.</entry>
</row>
<row>
<entry><command>pw</command></entry>
<entry>A powerful and flexible tool to modify all aspects
of user accounts.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<sect2 id="users-adduser">
<title>adduser</title>
@ -413,11 +448,13 @@ Goodbye!
<para>In summary, we changed the default shell to
<application>zsh</application> (an additional shell found in
packages), and turned off the sending of a welcome mail to
added users. We then saved the configuration, and then
created an account for <username>jru</username>, and we made
the Ports Collection), and turned off the sending of a welcome mail to
added users. We then saved the configuration,
created an account for <username>jru</username>, and made
sure <username>jru</username> is in <username>wheel</username>
group (which we will see is important later).</para>
group (so that she may assume the role of
<username>root</username> with the <command>su</command>
command.)</para>
<note>
<para>The password you type in is not echoed, nor are asterisks
@ -515,23 +552,6 @@ Removing files belonging to jru from /var/tmp/vi.recover: done.
</example>
</sect2>
<sect2 id="users-pw">
<title><application>pw</application></title>
<indexterm><primary><command>pw</command></primary></indexterm>
<para><command>pw</command> is a command line utility to
create, remove, modify, and display users and groups, and functions
as an editor of the system user and group files. This section
describes its use for users. The <link
linkend="users-groups">Groups</link> section below describes its
use for groups.</para>
<para>It is designed to be useful both as a directly executed
command and for use from shell scripts.</para>
<para>For detailed information, please see &man.pw.8;.</para>
</sect2>
<sect2 id="users-chpass">
<title><application>chpass</application></title>
@ -570,7 +590,7 @@ Home Phone:
Other information:</screen>
</example>
<para>The normal user can change only a small subsection of this
<para>The normal user can change only a small subset of this
information, and only for themselves.</para>
<example>
@ -592,7 +612,8 @@ Other information:</screen>
<command>ypchfn</command>, and
<command>ypchsh</command>. NIS support is automatic, so
specifying the <literal>yp</literal> before the command is
not necessary.</para>
not necessary. If this is confusing to you, don't worry, NIS will
be covered in <xref linkend="advanced-networking"></para>
</note>
</sect2>
<sect2 id="users-passwd">
@ -638,12 +659,28 @@ passwd: done</screen>
</example>
<note>
<para><command>yppasswd</command> is just a link to
<command>passwd</command>. NIS support is automatic, so
specifying the <literal>yp</literal> before the command is
not necessary.</para>
<para>As with <command>chpass</command>,
<command>yppasswd</command> is just a link to
<command>passwd</command>, so NIS works with either
command.</para>
</note>
</sect2>
<sect2 id="users-pw">
<title><application>pw</application></title>
<indexterm><primary><command>pw</command></primary></indexterm>
<para>&man.pw.8; is a command line utility to create, remove,
modify, and display users and groups. It functions as a front
end to the system user and group files. <command>pw</command>
has a very powerful set of command line options that make it
suitable for use in shell scripts, but new users may find it
more complicated than the other commands presented
here.</para>
</sect2>
</sect1>
<sect1 id="users-limiting">