aboutsummaryrefslogtreecommitdiff
path: root/zh_CN.GB2312/books/handbook/users/chapter.xml
diff options
context:
space:
mode:
Diffstat (limited to 'zh_CN.GB2312/books/handbook/users/chapter.xml')
-rw-r--r--zh_CN.GB2312/books/handbook/users/chapter.xml100
1 files changed, 45 insertions, 55 deletions
diff --git a/zh_CN.GB2312/books/handbook/users/chapter.xml b/zh_CN.GB2312/books/handbook/users/chapter.xml
index efc457cf32..48a04751e1 100644
--- a/zh_CN.GB2312/books/handbook/users/chapter.xml
+++ b/zh_CN.GB2312/books/handbook/users/chapter.xml
@@ -5,22 +5,17 @@
Original Revision: 1.60
$FreeBSD$
-->
-
-<chapter id="users">
- <chapterinfo>
+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="users">
+ <info><title>用户和基本的帐户管理</title>
<authorgroup>
- <author>
- <firstname>Neil</firstname>
- <surname>Blakey-Milner</surname>
- <contrib>Contributed by </contrib>
- </author>
+ <author><personname><firstname>Neil</firstname><surname>Blakey-Milner</surname></personname><contrib>Contributed by </contrib></author>
</authorgroup>
- <!-- Feb 2000 -->
- </chapterinfo>
+
+ </info>
- <title>用户和基本的帐户管理</title>
+
- <sect1 id="users-synopsis">
+ <sect1 xml:id="users-synopsis">
<title>概述</title>
<para>FreeBSD允许多个用户同时使用计算机. 当然,这些用户中不是很多人同时坐在同一台计算机前.
@@ -60,13 +55,12 @@
<itemizedlist>
<listitem>
- <para>了解&unix;和FreeBSD的基础知识 (<xref
- linkend="basics"/>).</para>
+ <para>了解&unix;和FreeBSD的基础知识 (<xref linkend="basics"/>).</para>
</listitem>
</itemizedlist>
</sect1>
- <sect1 id="users-introduction">
+ <sect1 xml:id="users-introduction">
<title>介绍</title>
<para>所有访问系统的用户都是通过帐户完成的,所以用户和帐户管理是FreeBSD系统不可或缺的重要部分.</para>
@@ -100,7 +94,7 @@
<term>用户 ID (UID)</term>
<listitem>
- <para>UID是系统用来识别用户的数字,传统上它的范围是0到65536之间<footnote id="users-largeuidgid">
+ <para>UID是系统用来识别用户的数字,传统上它的范围是0到65536之间<footnote xml:id="users-largeuidgid">
<para>可以使用的 UID/GID 的最大值是
4294967295, 但这可能会给采用上述假定的软件造成严重的问题。</para>
</footnote>,用以唯一地标识用户。
@@ -166,9 +160,9 @@
<listitem>
<para>主目录是用户用来启动的目录的完全路径。
一个通常的规则是把所有用户的主目录都放在
- <filename>/home/<replaceable>username</replaceable></filename>
+ <filename>/home/username</filename>
下,或者
- <filename>/usr/home/<replaceable>username</replaceable></filename>
+ <filename>/usr/home/username</filename>
下。 用户将把他们的个人文件放在自己的主目录下,
他们可以在那里创建任何目录.</para>
</listitem>
@@ -184,16 +178,13 @@
</varlistentry>
</variablelist>
- <para>有三种类型的帐户: <link
- linkend="users-superuser">超级用户</link>, <link
- linkend="users-system">系统用户</link>, 以及 <link
- linkend="users-user">普通用户</link>。
- 超级用户帐户通常叫做 <username>root</username>,
+ <para>有三种类型的帐户: <link linkend="users-superuser">超级用户</link>, <link linkend="users-system">系统用户</link>, 以及 <link linkend="users-user">普通用户</link>。
+ 超级用户帐户通常叫做 <systemitem class="username">root</systemitem>,
可以没有限制地管理系统。 系统用户运行服务。
最后, 普通用户给那些登录系统以及阅读邮件的人使用。</para>
</sect1>
- <sect1 id="users-superuser">
+ <sect1 xml:id="users-superuser">
<title>超级用户帐户</title>
<indexterm>
@@ -201,7 +192,7 @@
<secondary>超级用户 (root)</secondary>
</indexterm>
<para>超级用户帐户,
- 通常叫做 <username>root</username>,
+ 通常叫做 <systemitem class="username">root</systemitem>,
可以重新配置和管理系统, 在收发邮件, 系统检查或编程这样的日常工作中,
尽量不要使用root权限。</para>
@@ -219,7 +210,7 @@
我们将讨论如何创建一个额外的帐户和如何在普通用户和超级用户之间进行切换。</para>
</sect1>
- <sect1 id="users-system">
+ <sect1 xml:id="users-system">
<title>系统帐户</title>
<indexterm>
@@ -232,28 +223,28 @@
<indexterm>
<primary>帐户</primary>
- <secondary><username>daemon</username></secondary>
+ <secondary><systemitem class="username">daemon</systemitem></secondary>
</indexterm>
<indexterm>
<primary>帐户</primary>
- <secondary><username>operator</username></secondary>
+ <secondary><systemitem class="username">operator</systemitem></secondary>
</indexterm>
- <para>典型的系统帐户包括 <username>daemon</username>、
- <username>operator</username>、 <username>bind</username> (供
- 域名服务 使用)、 <username>news</username>, 以及
- <username>www</username>。</para>
+ <para>典型的系统帐户包括 <systemitem class="username">daemon</systemitem>、
+ <systemitem class="username">operator</systemitem>、 <systemitem class="username">bind</systemitem> (供
+ 域名服务 使用)、 <systemitem class="username">news</systemitem>, 以及
+ <systemitem class="username">www</systemitem>。</para>
<indexterm>
<primary>帐户</primary>
- <secondary><username>nobody</username></secondary>
+ <secondary><systemitem class="username">nobody</systemitem></secondary>
</indexterm>
- <para><username>nobody</username> 是普通的没有特权的系统用户。
+ <para><systemitem class="username">nobody</systemitem> 是普通的没有特权的系统用户。
然而, 大多数与用户联系很密切的服务是使用
- <username>nobody</username>的, 记的这点非常重要,
+ <systemitem class="username">nobody</systemitem>的, 记的这点非常重要,
这样可能使用户变的非常有特权。</para>
</sect1>
- <sect1 id="users-user">
+ <sect1 xml:id="users-user">
<title>用户帐户</title>
<indexterm>
@@ -272,7 +263,7 @@
编辑器, 键盘绑定和语言等适应并且更好的使用这个系统。</para>
</sect1>
- <sect1 id="users-modifying">
+ <sect1 xml:id="users-modifying">
<title>修改帐户</title>
<indexterm>
@@ -319,7 +310,7 @@
</tgroup>
</informaltable>
- <sect2 id="users-adduser">
+ <sect2 xml:id="users-adduser">
<title><command>添加用户</command></title>
<indexterm>
@@ -330,7 +321,7 @@
<primary><command>添加用户</command></primary>
</indexterm>
<indexterm>
- <primary><filename class="directory">/usr/share/skel</filename></primary>
+ <primary><filename>/usr/share/skel</filename></primary>
</indexterm>
<indexterm><primary>skeleton directory</primary></indexterm>
<para>&man.adduser.8; 是一个简单的添加新用户的命令. 它为用户创建
@@ -378,7 +369,7 @@ Add another user? (yes/no): <userinput>no</userinput> Goodbye!
</note>
</sect2>
- <sect2 id="users-rmuser">
+ <sect2 xml:id="users-rmuser">
<title><command>删除用户</command></title>
<indexterm><primary><command>rmuser</command></primary></indexterm>
@@ -440,7 +431,7 @@ Removing files belonging to jru from /var/tmp/vi.recover: done.
</example>
</sect2>
- <sect2 id="users-chpass">
+ <sect2 xml:id="users-chpass">
<title><command>chpass</command></title>
<indexterm><primary><command>chpass</command></primary></indexterm>
@@ -501,7 +492,7 @@ Other information:</screen>
NIS 将在 <xref linkend="network-servers"/> 介绍。</para>
</note>
</sect2>
- <sect2 id="users-passwd">
+ <sect2 xml:id="users-passwd">
<title><command>passwd命令</command></title>
<indexterm><primary><command>passwd命令</command></primary></indexterm>
@@ -544,7 +535,7 @@ passwd: done</screen>
</sect2>
- <sect2 id="users-pw">
+ <sect2 xml:id="users-pw">
<title><command>pw命令</command></title>
<indexterm><primary><command>pw命令</command></primary></indexterm>
@@ -557,7 +548,7 @@ passwd: done</screen>
</sect1>
- <sect1 id="users-limiting">
+ <sect1 xml:id="users-limiting">
<title>限制用户使用系统资源</title>
<indexterm><primary>限制用户使用系统资源</primary></indexterm>
@@ -577,8 +568,7 @@ passwd: done</screen>
<indexterm><primary>磁盘配额</primary></indexterm>
<para>磁盘配额限制用户对磁盘的使用,
而且它还提供一种快速检查用户使用磁盘数量而不需要时刻计算的方法。
- 配额将在 <xref
- linkend="quotas"/>讨论.</para>
+ 配额将在 <xref linkend="quotas"/>讨论.</para>
<para>其它资源限制包括CPU、 内存以及用户可能会使用的其它资源。
这些是通过对登录进行分类完成的, 下面将做讨论。</para>
@@ -591,7 +581,7 @@ passwd: done</screen>
联机手册会有比较详细的描述。 可以说每个用户都分配到一个登录类
(默认是 <literal>defalut</literal>),
每个登录类都有一套和它相对应的功能。 登录功能是
- <literal><replaceable>名字</replaceable>=<replaceable>值</replaceable></literal>
+ <literal>名字=值</literal>
这样的一对值, 其中<replaceable>名字</replaceable>
是一个众所周知的标识符, <replaceable>值</replaceable>
是一个根据名字经过处理得到的任意字符串。 设置登录类和功能相当简单,
@@ -812,7 +802,7 @@ passwd: done</screen>
&man.cap.mkdb.1;, &man.getrlimit.2;, &man.login.conf.5;.</para>
</sect1>
- <sect1 id="users-groups">
+ <sect1 xml:id="users-groups">
<title>组</title>
<indexterm><primary>组</primary></indexterm>
@@ -839,7 +829,7 @@ passwd: done</screen>
<para>如果不想手工编辑 <filename>/etc/group</filename>,
也可以使用 &man.pw.8; 添加和编辑组。 例如,
- 要添加一个叫 <groupname>teamtwo</groupname> 的组,
+ 要添加一个叫 <systemitem class="groupname">teamtwo</systemitem> 的组,
确定它存在:</para>
<example>
@@ -851,11 +841,11 @@ teamtwo:*:1100:</screen>
</example>
<para>上面的数字 <literal>1100</literal> 是组
- <groupname>teamtwo</groupname> 的组 ID。
- 目前, <groupname>teamtwo</groupname> 还没有成员,
+ <systemitem class="groupname">teamtwo</systemitem> 的组 ID。
+ 目前, <systemitem class="groupname">teamtwo</systemitem> 还没有成员,
因此也就没有多大用处。
- 接下来, 把 <username>jru</username> 加入到
- <groupname>teamtwo</groupname> 组。</para>
+ 接下来, 把 <systemitem class="username">jru</systemitem> 加入到
+ <systemitem class="groupname">teamtwo</systemitem> 组。</para>
<example>
<title>使用 &man.pw.8; 设置组的成员列表</title>
@@ -895,8 +885,8 @@ teamtwo:*:1100:jru,db</screen>
uid=1001(jru) gid=1001(jru) groups=1001(jru), 1100(teamtwo)</screen>
</example>
- <para>正如您所看到的, <username>jru</username> 是组 <groupname>jru</groupname> 和组
- <groupname>teamtwo</groupname>的成员.</para>
+ <para>正如您所看到的, <systemitem class="username">jru</systemitem> 是组 <systemitem class="groupname">jru</systemitem> 和组
+ <systemitem class="groupname">teamtwo</systemitem>的成员.</para>
<para>有关&man.pw.8;的更多信息, 请参看其它联机手册。
更多的关于 <filename>/etc/group</filename> 文件格式的信息,