OSDN Git Service

0e738bcf821c4445fbd5331cfdbfd31a53a14242
[linuxjm/LDP_man-pages.git] / draft / man5 / passwd.5
1 .\" Copyright (c) 1993 Michael Haardt (michael@moria.de),
2 .\"     Fri Apr  2 11:32:09 MET DST 1993
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 .\"
30 .\" Japanese Version Copyright (c) 1997 Kazuyuki Tanisako
31 .\"         all rights reserved.
32 .\" Translated 1998-02-10, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
33 .\" Updated 1998-09-23, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
34 .\" Updated 2006-07-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
35 .\"
36 .TH PASSWD 5 1998-01-05 "Linux" "Linux Programmer's Manual"
37 .\"O .SH NAME
38 .SH 名前
39 .\"O passwd \- password file
40 passwd \- パスワードファイル
41 .\"O .SH DESCRIPTION
42 .SH 説明
43 .\"O .B Passwd
44 .\"O is a text file, that contains a list of the system's accounts,
45 .\"O giving for each account some useful information like user ID,
46 .\"O group ID, home directory, shell, etc.
47 .B passwd
48 ファイルは、そのシステムのアカウントリストを保持するテキストファイルである。
49 アカウント毎に、ユーザー ID、グループ ID、ホームディレクトリ、
50 使用する shell コマンドの種類、等の有用な情報を提供している。
51 .\"O Often, it also contains the encrypted passwords for each account.
52 .\"O It should have general read permission (many utilities, like
53 .\"O .BR ls (1)
54 .\"O use it to map user IDs to usernames), but write access only for the
55 .\"O superuser.
56 また、各アカウントの暗号化されたパスワードを保持する場合もある。
57 パスワードファイルのアクセス許可は、全ユーザーに
58 読み出しの許可を与え
59 .RI ( ls (1)
60 等の多くのユーティリティではユーザー ID をユーザー名に
61 対応させるのに
62 .B passwd
63 ファイルを使用する)、
64 書き込み許可はスーパーユーザーにのみ与えるようにすべきである。
65 .PP
66 .\"O In the good old days there was no great problem with this general
67 .\"O read permission.
68 .\"O Everybody could read the encrypted passwords, but the
69 .\"O hardware was too slow to crack a well-chosen password, and moreover, the
70 .\"O basic assumption used to be that of a friendly user-community.
71 .\"O These days many people run some version of the shadow password suite, where
72 .\"O .I /etc/passwd
73 .\"O has asterisks (*) instead of encrypted passwords,
74 .\"O and the encrypted passwords are in
75 .\"O .I /etc/shadow
76 .\"O which is readable by the superuser only.
77 古き良き時代には、この全ユーザーに対する読み取り許可は
78 特別な問題を起こさなかった。誰でも暗号化されたパスワードを
79 読むことが出来たが、上手に選ばれたパスワードを破るのには
80 当時のハードウェアの速度はあまりに遅かったし、それに加えて
81 友好的なユーザー社会であることを基本的な前提としていた。
82 最近では多くの人が、何らかのバージョンの shadow password suite
83 (シャドウ・パスワード機能を実現するためのプログラム群)
84 を動かしている。その場合
85 .I /etc/passwd
86 ファイルのパスワード欄には、暗号化されたパスワードの代わりに
87 アスタリスク (*) が設定される。暗号化されたパスワードは
88 .I /etc/shadow
89 ファイルに保持される。
90 .I /etc/shadow
91 ファイルはスーパーユーザーだけが読み出すことができる。
92 .PP
93 .\"O Regardless of whether shadow passwords are used, many sysadmins
94 .\"O use an asterisk in the encrypted password field to make sure
95 .\"O that this user can not authenticate him- or herself using a
96 .\"O password.
97 .\"O (But see the Notes below.)
98 shadow password が使われているかどうかにはよらず、多くのシステム
99 管理者は、暗号化パスワード欄にアスタリスクを設定することで、
100 そのユーザーがパスワードでの認証が受けられないようにしている
101 (下記の「注意」の項を参照)。
102 .PP
103 .\"O If you create a new login, first put an asterisk in the password field,
104 .\"O then use
105 .\"O .BR passwd (1)
106 .\"O to set it.
107 新しいユーザーを登録する場合には、パスワード欄にアスタリスクを設定しておき
108 .BR passwd (1)
109 コマンドにより設定を行うようにする。
110 .PP
111 .\"O There is one entry per line, and each line has the format:
112 パスワードファイルは 1 行ごとに 1 エントリを持ち、
113 各行の書式は以下の通りである:
114 .sp
115 .RS
116 account:password:UID:GID:GECOS:directory:shell
117 .RE
118 .sp
119 .\"O The field descriptions are:
120 各欄の説明:
121 .RS
122 .TP 1.0in
123 .I account
124 .\"O the name of the user on the system.
125 .\"O It should not contain capital letters.
126 そのシステムでのユーザー名。大文字を含まないようにする。
127 .TP
128 .I password
129 .\"O the encrypted user password, an asterisk (*), or the letter \(aqx\(aq.
130 .\"O (See
131 .\"O .BR pwconv (8)
132 .\"O for an explanation of \(aqx\(aq.)
133 ユーザーの暗号化されたパスワード、アスタリスク、または文字 \(aqx\(aq
134 (\(aqx\(aq の説明については
135 .BR pwconv (8)
136 を参照)。
137 .TP
138 .I UID
139 .\"O the numerical user ID.
140 ユーザー ID 番号。
141 .TP
142 .I GID
143 .\"O the numerical primary group ID for this user.
144 ユーザーが属するプライマリグループ ID 番号。
145 .TP
146 .I GECOS
147 .\"O This field is optional and only used for informational purposes.
148 .\"O Usually, it contains the full username.
149 .\"O GECOS means General Electric
150 .\"O Comprehensive Operating System, which has been renamed to GCOS when
151 .\"O GE's large systems division was sold to Honeywell.
152 .\"O Dennis Ritchie has reported: "Sometimes we sent printer output or
153 .\"O batch jobs to the GCOS machine.
154 .\"O The gcos field in the password file was a place to stash the
155 .\"O information for the $IDENTcard.
156 .\"O Not elegant."
157 本欄は省略可能で、情報提供の目的のみに使われる。
158 ユーザーのフルネームを設定することが多い。GECOS は General Electric
159 Comprehensive Operating System を意味しており、GE 社の大規模システム部門
160 が Honeywell 社に売却された際に GCOS へと変更された。Dennis Ritchie 氏は
161 次のように言っている:「時々プリンタ出力や、
162 バッチジョブを GCOS マシンに送ったりするが、
163 パスワードファイルの gcos 欄は $IDENT カード用の情報を
164 隠しておくための場所なんだ。まるっきりエレガントじゃない。」
165 .TP
166 .I directory
167 .\"O the user's
168 .\"O .B $HOME
169 .\"O directory.
170 ユーザーの
171 .B $HOME
172 ディレクトリ。
173 .TP
174 .I shell
175 .\"O the program to run at login (if empty, use
176 .\"O .IR /bin/sh ).
177 .\"O If set to a nonexisting executable, the user will be unable to login
178 .\"O through
179 .\"O .BR login (1).
180 ログイン時に動くプログラム名 (空欄の場合
181 .I /bin/sh
182 が使われる)。
183 存在しない実行プログラムが設定された場合、
184 .BR login (1)
185 によるシステムへのログインはできなくなる。
186 .RE
187 .\"O .SH FILES
188 .SH ファイル
189 .I /etc/passwd
190 .\"O .SH NOTES
191 .SH 注意
192 .\"O If you want to create
193 .\"O user groups, their GIDs must be equal and there must be an entry in
194 .\"O \fI/etc/group\fP, or no group will exist.
195 ユーザーグループを作りたい場合には、同じグループに属する
196 ユーザーの GID は同じ値とし、その GID を \fI/etc/group\fP の中に
197 定義しておく必要がある。そうしないとグループを作ったことにはならない。
198 .PP
199 .\"O If the encrypted password is set to an asterisk, the user will be unable
200 .\"O to login using
201 .\"O .BR login (1),
202 .\"O but may still login using
203 .\"O .BR rlogin (1),
204 .\"O run existing processes and initiate new ones through
205 .\"O .BR rsh (1),
206 .\"O .BR cron (8),
207 .\"O .BR at (1),
208 .\"O or mail filters, etc.
209 .\"O Trying to lock an account by simply changing the
210 .\"O shell field yields the same result and additionally allows the use of
211 .\"O .BR su (1).
212 暗号化パスワードとしてアスタリスクを設定すると、
213 .BR login (1)
214 を使ってのログインができなくなるが、
215 .BR rlogin (1)
216 ではまだログインができるし、
217 .BR rsh (1),
218 .BR cron (8),
219 .BR at (1)
220 やメイルのフィルタ等を使い、現存するプロセスを
221 実行させたり、新たなプロセスを起動したりすることができる。
222 使用する shell の欄を、単に変更することでアカウントを
223 使えないようにするのも同様の結果となる。その場合にはさらに
224 .BR su (1)
225 も有効なまま残ってしまう。
226 .\"O .SH "SEE ALSO"
227 .SH 関連項目
228 .BR login (1),
229 .BR passwd (1),
230 .BR su (1),
231 .BR getpwent (3),
232 .BR getpwnam (3),
233 .BR group (5),
234 .BR shadow (5)