Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / zh_CN / passwd.5
1 .\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993
2 .\" Chinese Version Copyright Scorpio, www.linuxforum.net, 2000
3 .\"
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, write to the Free
21 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
22 .\" USA.
23 .\"
24 .\" Modified Sun Jul 25 10:46:28 1993 by Rik Faith (faith@cs.unc.edu)
25 .\" Modified Sun Aug 21 18:12:27 1994 by Rik Faith (faith@cs.unc.edu)
26 .\" Modified Sun Jun 18 01:53:57 1995 by Andries Brouwer (aeb@cwi.nl)
27 .\" Modified Mon Jan 5 20:24:40 MET 1998 by Michael Haardt
28 .\" (michael@cantor.informatik.rwth-aachen.de)
29 .TH PASSWD 5 "January 5, 1998" "" "File formats"
30 .SH NAME 名称
31 passwd \- 密码文件
32 .SH 描述
33 .B Passwd
34 是个文本文件, 它包含了一个系统帐户列表,
35 给出每个帐户一些有用的信息,比如用户 ID,组 ID, 家目录, shell,等.
36 通常它也包含了每个用户经过加密的密码.
37 它通常应该是可读的(许多命令,工具程序,象
38 .BR ls (1)
39 用它做用户 Id 到用户名称的映射),但是只允许超级用户有写方式权限.
40 .PP
41 在过去美好的日子里,这种一般的读许可没有什么大问题.
42 每个人都能读到加密了的密码,因为硬件太慢以至于不能解开一个
43 精选的密码,另外,这基本假定是为友好的使用团体使用的.
44 现在,许多人运行一些版本的影子密码套件,它们在
45 .I /etc/passwd
46 的密码域里是 *,而不再是加密的口令,
47 加密的口令放在
48 .I /etc/shadow
49 中,那个文件只有超级用户能读.
50 .PP
51 不管是否使用了影子密码,许多系统管理员使用一个星号在加密的密码字段
52 以确保用户不能鉴别他(她)自己的密码. (见下面的注意)
53 .PP
54 如果你建立了一个新的登录,首先放个星号在密码字段,
55 然后使用
56 .BR passwd (1)
57 设置它.
58 .PP
59 (密码文件)里每行一条记录,并且每行有这样的格式:
60 .sp
61 .RS
62 account:password:UID:GID:GECOS:directory:shell
63 (帐号:密码:用户ID:组ID:一般的信息:目录:shell)
64 .RE
65 .sp
66 字段描述如下:
67 .sp
68 .RS
69 .TP 1.0in
70 .I account
71 使用者在系统中的名字,它不能包含大写字母.
72 .TP
73 .I password
74 加密的用户密码,或者星号。
75 .TP
76 .I UID
77 用户 ID 数。
78 .TP
79 .I GID
80 用户的主要组 ID 数。
81 .TP
82 .I GECOS
83 这字段是可选的,通常为了存放信息目的而设的.
84 通常,它包含了用户的全名. GECOS 意思是通用电气综合操作系统(General Electric
85 Comprehensive Operating System), 当 GE 的大型系统部分割售卖给 Honeywell
86 时它被改为 GCOS. Dennis Ritchie 作过报告:"有时我们发送印刷品或批道作业到
87 GCOS机器时,gcos 字段打断了 $IDENT 卡的信息,不太美观。"(译者:我想是太长吧) 
88 .TP
89 .I directory
90 用户的 $HOME 目录.
91 .TP
92 .I shell
93 登录时运行的程序(如果空的,使用
94 .BR /bin/sh ).
95 如果设为不存在的执行(程序),用户不能通过
96 .BR login (1)
97 登录.
98 .RE
99 .SH 注意
100 如果你想建立用户组,他们的 GID 必须相等并且一定是在
101 \fI/etc/group\fP的一条记录, 要不然组就不存在.
102 .PP
103 如果加密密码设成星号,用户将不能用
104 .BR login (1)
105 来登录, 但依然可以用
106 .BR rlogin (1)
107 登录, 通过
108 .BR rsh (1)
109 或者
110 .BR cron (1)
111 或者
112 .BR at (1)
113 或者 mail 过滤器等程序运行已有的进程和开始新的等.
114 试图通过简单改变 shell 字段锁住一个用户结果是一样的,
115 而且还附上了使用
116 .B su(1) 
117 的权限.
118 .SH 相关文件
119 .I /etc/passwd
120 .SH "又见"
121 .BR passwd (1),
122 .BR login (1),
123 .BR su (1),
124 .BR group (5),
125 .BR shadow (5)
126 .br
127 .SH "[中文版维护人]"
128 .B Scorpio <rawk@chinese.com>
129 .SH "[中文版最新更新]"
130 .B 2000/11/26
131 .SH "《中国linux论坛man手册页翻译计划》:"
132 .BI http://cmpp.linuxforum.net