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:
parent
6dbf07d805
commit
93321474e5
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=9953
1 changed files with 62 additions and 52 deletions
|
@ -1,16 +1,26 @@
|
|||
<!--
|
||||
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">
|
||||
<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>
|
||||
|
||||
<sect1 id="users-synopsis">
|
||||
<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
|
||||
processes are run by users, so user and account management are
|
||||
|
@ -34,7 +44,7 @@
|
|||
<secondary>superuser (root)</secondary>
|
||||
</indexterm>
|
||||
<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
|
||||
tasks like sending and receiving mail, general exploration of
|
||||
the system, or programming.</para>
|
||||
|
@ -46,12 +56,9 @@
|
|||
normal user accounts whenever possible, unless you especially
|
||||
need the extra privilege.</para>
|
||||
|
||||
<para>In addition, always double and triple-check commands you
|
||||
issue as the superuser, since an extra space or missing
|
||||
character can mean irreparable data loss. Those extra
|
||||
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>You should always double and triple-check commands you issue
|
||||
as the superuser, since an extra space or missing character can
|
||||
mean irreparable data loss.</para>
|
||||
|
||||
<para>So, the first thing you should do after reading this
|
||||
chapter, is to create an unprivileged user account for yourself
|
||||
|
@ -93,9 +100,10 @@
|
|||
<secondary>nobody</secondary>
|
||||
</indexterm>
|
||||
<para><username>nobody</username> is the generic unprivileged
|
||||
system user, but the more services that use
|
||||
<username>nobody</username>, the more privileged it
|
||||
becomes.</para>
|
||||
system user. However, it's important to keep in mind that the
|
||||
more services that use <username>nobody</username>, the more
|
||||
files and processes that user will become associated with, and
|
||||
hence the more privileged that user becomes.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="users-user">
|
||||
|
@ -111,10 +119,10 @@
|
|||
or other users, and allowing users to customize their
|
||||
environment without affecting others.</para>
|
||||
|
||||
<para>Every person accessing your system should have their own
|
||||
unique user account. This allows you to find out who is doing
|
||||
what, and prevent people from clobbering each others' settings,
|
||||
and reading mail meant for the other, and so forth.</para>
|
||||
<para>Every person accessing your system should have a unique user
|
||||
account. This allows you to find out who is doing what, prevent
|
||||
people from clobbering each others' settings or reading each
|
||||
others' mail, and so forth.</para>
|
||||
|
||||
<para>Each user can set up their own environment to accommodate
|
||||
their use of the system, by using alternate shells, editors, key
|
||||
|
@ -129,16 +137,16 @@
|
|||
<secondary>modifying</secondary>
|
||||
</indexterm>
|
||||
<para><application>pw</application> is a powerful and flexible
|
||||
means to modify accounts, but <application>adduser</application>
|
||||
is recommended for creating new accounts, and
|
||||
<application>rmuser</application> for deleting accounts.</para>
|
||||
tool to modify all aspects of user accounts. For most tasks
|
||||
however, <application>adduser</application> and
|
||||
<application>rmuser</application> are recommended to add and
|
||||
remove accounts respectively.</para>
|
||||
|
||||
<para><application>chpass</application> allows both the system
|
||||
administrator and normal users to adjust passwords, shells, and
|
||||
personal information. <application>passwd</application> is the
|
||||
more common means to change passwords specifically,
|
||||
however.</para>
|
||||
|
||||
personal information. If you are only interested in changing a
|
||||
password then the <application>passwd</application> command is
|
||||
usually quicker.</para>
|
||||
|
||||
<sect2 id="users-adduser">
|
||||
<title>adduser</title>
|
||||
|
@ -151,11 +159,12 @@
|
|||
<indexterm><primary>/usr/share/skel</primary></indexterm>
|
||||
<indexterm><primary>skeleton directory</primary></indexterm>
|
||||
<para><application>adduser</application> is a simple program for
|
||||
adding new users. It creates <filename>passwd</filename> and
|
||||
<filename>group</filename> entries for the user, as well as
|
||||
creating their home directory, copy in some default dotfiles
|
||||
from <filename>/usr/share/skel</filename>, and can optionally
|
||||
mail the user a welcome message.</para>
|
||||
adding new users. It creates entries in the system
|
||||
<filename>passwd</filename> and <filename>group</filename>
|
||||
files. It will also create a home directory for the new user,
|
||||
copy in the default configuration files ("dotfiles") from
|
||||
<filename>/usr/share/skel</filename>, and can optionally mail
|
||||
the new user a welcome message.</para>
|
||||
|
||||
<para>To create the initial configuration file, use
|
||||
<command>adduser -s -config_create</command>.
|
||||
|
@ -163,20 +172,22 @@
|
|||
<para>The <option>-s</option> makes adduser default to
|
||||
quiet. We use <option>-v</option> later when we want to
|
||||
change defaults.</para>
|
||||
</footnote>Next, we configure adduser defaults, and create our
|
||||
first user account, since using root for normal usage is evil
|
||||
and nasty.</para>
|
||||
</footnote>
|
||||
Next, we configure <application>adduser</application>
|
||||
defaults, and create our first user account, since using
|
||||
<username>root</username> for normal usage is evil and
|
||||
nasty.</para>
|
||||
|
||||
<example>
|
||||
<title>Changing the configuration for adduser</title>
|
||||
<title>Configuring adduser</title>
|
||||
|
||||
<screen>&prompt.root; <userinput>adduser -v</userinput>
|
||||
Use option ``-silent'' if you don't want to see all warnings and questions.
|
||||
Check /etc/shells
|
||||
Check /etc/master.passwd
|
||||
Check /etc/group
|
||||
Enter your default shell: csh date no sh tcsh [sh]: <userinput>tcsh</userinput>
|
||||
Your default shell is: tcsh -> /usr/local/bin/tcsh
|
||||
Enter your default shell: csh date no sh tcsh [sh]: <userinput>zsh</userinput>
|
||||
Your default shell is: tcsh -> /usr/local/bin/zsh
|
||||
Enter your default HOME partition: [/home]:
|
||||
Copy dotfiles from: /usr/share/skel no [/usr/share/skel]:
|
||||
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.
|
||||
Enter username [a-z0-9_-]: <userinput>jru</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]:
|
||||
Uid [1001]:
|
||||
Enter login class: default []:
|
||||
|
@ -208,7 +219,7 @@ Gid: 1007 (jru)
|
|||
Class:
|
||||
Groups: jru wheel
|
||||
HOME: /home/jru
|
||||
Shell: /usr/local/bin/tcsh
|
||||
Shell: /usr/local/bin/zsh
|
||||
OK? (y/n) [y]: <userinput>y</userinput>
|
||||
Added user ``jru''
|
||||
Copy files from /usr/share/skel to /home/jru
|
||||
|
@ -218,7 +229,7 @@ Goodbye!
|
|||
</example>
|
||||
|
||||
<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
|
||||
added users. We then saved the configuration, and then
|
||||
created an account for <username>jru</username>, and we made
|
||||
|
@ -241,7 +252,7 @@ Goodbye!
|
|||
</sect2>
|
||||
|
||||
<sect2 id="users-rmuser">
|
||||
<title>rmuser</title>
|
||||
<title><application>rmuser</application></title>
|
||||
|
||||
<indexterm><primary>rmuser</primary></indexterm>
|
||||
<indexterm>
|
||||
|
@ -249,10 +260,9 @@ Goodbye!
|
|||
<secondary>removing</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para><application>rmuser</application> removes users from the
|
||||
system, including any traces beyond the user database.</para>
|
||||
|
||||
<para><application>rmuser</application> performs the following
|
||||
<para>You can use <application>rmuser</application> to
|
||||
completely remove a user from the system.
|
||||
<application>rmuser</application> performs the following
|
||||
steps:</para>
|
||||
|
||||
<procedure>
|
||||
|
@ -265,7 +275,7 @@ Goodbye!
|
|||
user.</para>
|
||||
</step>
|
||||
<step>
|
||||
<para>Kills all processes owned by the user</para>
|
||||
<para>Kills all processes owned by the user.</para>
|
||||
</step>
|
||||
<step>
|
||||
<para>Removes the user from the system's local password
|
||||
|
@ -273,7 +283,7 @@ Goodbye!
|
|||
</step>
|
||||
<step>
|
||||
<para>Removes the user's home directory (if it is owned by
|
||||
the user)</para>
|
||||
the user).</para>
|
||||
</step>
|
||||
<step>
|
||||
<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 id="users-pw">
|
||||
<title>pw</title>
|
||||
<title><application>pw</application></title>
|
||||
<indexterm><primary>pw</primary></indexterm>
|
||||
|
||||
<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
|
||||
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 id="users-chpass">
|
||||
<title>chpass</title>
|
||||
<title><application>chpass</application></title>
|
||||
|
||||
<indexterm><primary>chpass</primary></indexterm>
|
||||
<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
|
||||
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
|
||||
containing user information, and upon exit from the editor,
|
||||
attempts to change the information in the user
|
||||
database.</para>
|
||||
containing user information. When the user exists from the
|
||||
editor, the user database is updated with the new
|
||||
information.</para>
|
||||
|
||||
<example>
|
||||
<title>Interactive chpass by Superuser</title>
|
||||
|
@ -529,7 +539,7 @@ passwd: done</screen>
|
|||
controlling disk space consumption: since users do not generate
|
||||
core files themselves, and often do not delete them, setting this
|
||||
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>
|
||||
</varlistentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue