Wrap author attribution in <chapterinfo>.

Reword a couple of run-on sentences to use better subject-verb
agreement.

Terminate all items in a list with a period, not just some of
them.

Add <username> and <application> tags as appropriate.

"pw(8) has the information"

doesn't look well without the benefits of a hyperlink.  Reword this to:

"For more information, please see pw(8)."

Update example to change shells to zsh since tcsh is now in the base
system.
This commit is contained in:
Murray Stokely 2001-07-17 21:35:41 +00:00
parent 6dbf07d805
commit 93321474e5
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=9953

View file

@ -1,16 +1,26 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/users/chapter.sgml,v 1.12 2001/07/08 22:53:33 dd Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/users/chapter.sgml,v 1.13 2001/07/17 00:21:21 chern Exp $
--> -->
<chapter id="users"> <chapter id="users">
<chapterinfo>
<authorgroup>
<author>
<firstname>Neils</firstname>
<surname>Blakey-Milner</surname>
<contrib>Contributed</contrib>
</author>
</authorgroup>
<!-- Feb 2000 -->
</chapterinfo>
<title>Users and Basic Account Management</title> <title>Users and Basic Account Management</title>
<sect1 id="users-synopsis"> <sect1 id="users-synopsis">
<title>Synopsis</title> <title>Synopsis</title>
<para><emphasis>Contributed by &a.nbm; February 2000</emphasis>.</para>
<para>All access to the system is achieved via accounts, and all <para>All access to the system is achieved via accounts, and all
processes are run by users, so user and account management are processes are run by users, so user and account management are
@ -34,7 +44,7 @@
<secondary>superuser (root)</secondary> <secondary>superuser (root)</secondary>
</indexterm> </indexterm>
<para>The superuser account, usually called <para>The superuser account, usually called
<username>root</username>, comes preconfigured, and facilitates <username>root</username>, comes preconfigured to facilitate
system administration, and should not be used for day-to-day system administration, and should not be used for day-to-day
tasks like sending and receiving mail, general exploration of tasks like sending and receiving mail, general exploration of
the system, or programming.</para> the system, or programming.</para>
@ -46,12 +56,9 @@
normal user accounts whenever possible, unless you especially normal user accounts whenever possible, unless you especially
need the extra privilege.</para> need the extra privilege.</para>
<para>In addition, always double and triple-check commands you <para>You should always double and triple-check commands you issue
issue as the superuser, since an extra space or missing as the superuser, since an extra space or missing character can
character can mean irreparable data loss. Those extra mean irreparable data loss.</para>
privileges you needed when you decided to change to the
superuser mean that the safeguards of your normal user account
no longer apply.</para>
<para>So, the first thing you should do after reading this <para>So, the first thing you should do after reading this
chapter, is to create an unprivileged user account for yourself chapter, is to create an unprivileged user account for yourself
@ -93,9 +100,10 @@
<secondary>nobody</secondary> <secondary>nobody</secondary>
</indexterm> </indexterm>
<para><username>nobody</username> is the generic unprivileged <para><username>nobody</username> is the generic unprivileged
system user, but the more services that use system user. However, it's important to keep in mind that the
<username>nobody</username>, the more privileged it more services that use <username>nobody</username>, the more
becomes.</para> files and processes that user will become associated with, and
hence the more privileged that user becomes.</para>
</sect1> </sect1>
<sect1 id="users-user"> <sect1 id="users-user">
@ -111,10 +119,10 @@
or other users, and allowing users to customize their or other users, and allowing users to customize their
environment without affecting others.</para> environment without affecting others.</para>
<para>Every person accessing your system should have their own <para>Every person accessing your system should have a unique user
unique user account. This allows you to find out who is doing account. This allows you to find out who is doing what, prevent
what, and prevent people from clobbering each others' settings, people from clobbering each others' settings or reading each
and reading mail meant for the other, and so forth.</para> others' mail, and so forth.</para>
<para>Each user can set up their own environment to accommodate <para>Each user can set up their own environment to accommodate
their use of the system, by using alternate shells, editors, key their use of the system, by using alternate shells, editors, key
@ -129,16 +137,16 @@
<secondary>modifying</secondary> <secondary>modifying</secondary>
</indexterm> </indexterm>
<para><application>pw</application> is a powerful and flexible <para><application>pw</application> is a powerful and flexible
means to modify accounts, but <application>adduser</application> tool to modify all aspects of user accounts. For most tasks
is recommended for creating new accounts, and however, <application>adduser</application> and
<application>rmuser</application> for deleting accounts.</para> <application>rmuser</application> are recommended to add and
remove accounts respectively.</para>
<para><application>chpass</application> allows both the system <para><application>chpass</application> allows both the system
administrator and normal users to adjust passwords, shells, and administrator and normal users to adjust passwords, shells, and
personal information. <application>passwd</application> is the personal information. If you are only interested in changing a
more common means to change passwords specifically, password then the <application>passwd</application> command is
however.</para> usually quicker.</para>
<sect2 id="users-adduser"> <sect2 id="users-adduser">
<title>adduser</title> <title>adduser</title>
@ -151,11 +159,12 @@
<indexterm><primary>/usr/share/skel</primary></indexterm> <indexterm><primary>/usr/share/skel</primary></indexterm>
<indexterm><primary>skeleton directory</primary></indexterm> <indexterm><primary>skeleton directory</primary></indexterm>
<para><application>adduser</application> is a simple program for <para><application>adduser</application> is a simple program for
adding new users. It creates <filename>passwd</filename> and adding new users. It creates entries in the system
<filename>group</filename> entries for the user, as well as <filename>passwd</filename> and <filename>group</filename>
creating their home directory, copy in some default dotfiles files. It will also create a home directory for the new user,
from <filename>/usr/share/skel</filename>, and can optionally copy in the default configuration files ("dotfiles") from
mail the user a welcome message.</para> <filename>/usr/share/skel</filename>, and can optionally mail
the new user a welcome message.</para>
<para>To create the initial configuration file, use <para>To create the initial configuration file, use
<command>adduser -s -config_create</command>. <command>adduser -s -config_create</command>.
@ -163,20 +172,22 @@
<para>The <option>-s</option> makes adduser default to <para>The <option>-s</option> makes adduser default to
quiet. We use <option>-v</option> later when we want to quiet. We use <option>-v</option> later when we want to
change defaults.</para> change defaults.</para>
</footnote>Next, we configure adduser defaults, and create our </footnote>
first user account, since using root for normal usage is evil Next, we configure <application>adduser</application>
and nasty.</para> defaults, and create our first user account, since using
<username>root</username> for normal usage is evil and
nasty.</para>
<example> <example>
<title>Changing the configuration for adduser</title> <title>Configuring adduser</title>
<screen>&prompt.root; <userinput>adduser -v</userinput> <screen>&prompt.root; <userinput>adduser -v</userinput>
Use option ``-silent'' if you don't want to see all warnings and questions. Use option ``-silent'' if you don't want to see all warnings and questions.
Check /etc/shells Check /etc/shells
Check /etc/master.passwd Check /etc/master.passwd
Check /etc/group Check /etc/group
Enter your default shell: csh date no sh tcsh [sh]: <userinput>tcsh</userinput> Enter your default shell: csh date no sh tcsh [sh]: <userinput>zsh</userinput>
Your default shell is: tcsh -> /usr/local/bin/tcsh Your default shell is: tcsh -> /usr/local/bin/zsh
Enter your default HOME partition: [/home]: Enter your default HOME partition: [/home]:
Copy dotfiles from: /usr/share/skel no [/usr/share/skel]: Copy dotfiles from: /usr/share/skel no [/usr/share/skel]:
Send message from file: /etc/adduser.message no Send message from file: /etc/adduser.message no
@ -190,7 +201,7 @@ Ok, let's go.
Don't worry about mistakes. I will give you the chance later to correct any input. Don't worry about mistakes. I will give you the chance later to correct any input.
Enter username [a-z0-9_-]: <userinput>jru</userinput> Enter username [a-z0-9_-]: <userinput>jru</userinput>
Enter full name []: <userinput>J. Random User</userinput> Enter full name []: <userinput>J. Random User</userinput>
Enter shell csh date no sh tcsh [tcsh]: Enter shell csh date no sh tcsh zsh [zsh]:
Enter home directory (full path) [/home/jru]: Enter home directory (full path) [/home/jru]:
Uid [1001]: Uid [1001]:
Enter login class: default []: Enter login class: default []:
@ -208,7 +219,7 @@ Gid: 1007 (jru)
Class: Class:
Groups: jru wheel Groups: jru wheel
HOME: /home/jru HOME: /home/jru
Shell: /usr/local/bin/tcsh Shell: /usr/local/bin/zsh
OK? (y/n) [y]: <userinput>y</userinput> OK? (y/n) [y]: <userinput>y</userinput>
Added user ``jru'' Added user ``jru''
Copy files from /usr/share/skel to /home/jru Copy files from /usr/share/skel to /home/jru
@ -218,7 +229,7 @@ Goodbye!
</example> </example>
<para>In summary, we changed the default shell to <para>In summary, we changed the default shell to
<application>tcsh</application> (an additional shell found in <application>zsh</application> (an additional shell found in
packages), and turned off the sending of a welcome mail to packages), and turned off the sending of a welcome mail to
added users. We then saved the configuration, and then added users. We then saved the configuration, and then
created an account for <username>jru</username>, and we made created an account for <username>jru</username>, and we made
@ -241,7 +252,7 @@ Goodbye!
</sect2> </sect2>
<sect2 id="users-rmuser"> <sect2 id="users-rmuser">
<title>rmuser</title> <title><application>rmuser</application></title>
<indexterm><primary>rmuser</primary></indexterm> <indexterm><primary>rmuser</primary></indexterm>
<indexterm> <indexterm>
@ -249,10 +260,9 @@ Goodbye!
<secondary>removing</secondary> <secondary>removing</secondary>
</indexterm> </indexterm>
<para><application>rmuser</application> removes users from the <para>You can use <application>rmuser</application> to
system, including any traces beyond the user database.</para> completely remove a user from the system.
<application>rmuser</application> performs the following
<para><application>rmuser</application> performs the following
steps:</para> steps:</para>
<procedure> <procedure>
@ -265,7 +275,7 @@ Goodbye!
user.</para> user.</para>
</step> </step>
<step> <step>
<para>Kills all processes owned by the user</para> <para>Kills all processes owned by the user.</para>
</step> </step>
<step> <step>
<para>Removes the user from the system's local password <para>Removes the user from the system's local password
@ -273,7 +283,7 @@ Goodbye!
</step> </step>
<step> <step>
<para>Removes the user's home directory (if it is owned by <para>Removes the user's home directory (if it is owned by
the user)</para> the user).</para>
</step> </step>
<step> <step>
<para>Removes the incoming mail files belonging to the user <para>Removes the incoming mail files belonging to the user
@ -323,7 +333,7 @@ Removing files belonging to jru from /var/tmp/vi.recover: done.
</sect2> </sect2>
<sect2 id="users-pw"> <sect2 id="users-pw">
<title>pw</title> <title><application>pw</application></title>
<indexterm><primary>pw</primary></indexterm> <indexterm><primary>pw</primary></indexterm>
<para><application>pw</application> is a command line utility to <para><application>pw</application> is a command line utility to
@ -336,11 +346,11 @@ Removing files belonging to jru from /var/tmp/vi.recover: done.
<para>It is designed to be useful both as a directly executed <para>It is designed to be useful both as a directly executed
command and for use from shell scripts.</para> command and for use from shell scripts.</para>
<para>&man.pw.8; has all the information.</para> <para>For detailed information, please see &man.pw.8;.</para>
</sect2> </sect2>
<sect2 id="users-chpass"> <sect2 id="users-chpass">
<title>chpass</title> <title><application>chpass</application></title>
<indexterm><primary>chpass</primary></indexterm> <indexterm><primary>chpass</primary></indexterm>
<para><application>chpass</application> changes user database <para><application>chpass</application> changes user database
@ -350,11 +360,11 @@ Removing files belonging to jru from /var/tmp/vi.recover: done.
<para>Only system administrators, as the superuser, may change <para>Only system administrators, as the superuser, may change
other users' information and passwords with chpass.</para> other users' information and passwords with chpass.</para>
<para>Passed no options, besides the optional username, <para>When passed no options, aside from an optional username,
<application>chpass</application> displays an editor <application>chpass</application> displays an editor
containing user information, and upon exit from the editor, containing user information. When the user exists from the
attempts to change the information in the user editor, the user database is updated with the new
database.</para> information.</para>
<example> <example>
<title>Interactive chpass by Superuser</title> <title>Interactive chpass by Superuser</title>
@ -529,7 +539,7 @@ passwd: done</screen>
controlling disk space consumption: since users do not generate controlling disk space consumption: since users do not generate
core files themselves, and often do not delete them, setting this core files themselves, and often do not delete them, setting this
may save them from running out of disk space should a large may save them from running out of disk space should a large
program (e.g., Emacs) crash.</para> program (e.g., <application>emacs</application>) crash.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>