.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), .\" Fri Apr 2 11:32:09 MET DST 1993 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" Modified Sun Jul 25 10:46:28 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Sun Aug 21 18:12:27 1994 by Rik Faith (faith@cs.unc.edu) .\" Modified Sun Jun 18 01:53:57 1995 by Andries Brouwer (aeb@cwi.nl) .\" Modified Mon Jan 5 20:24:40 MET 1998 by Michael Haardt .\" (michael@cantor.informatik.rwth-aachen.de) .\" .\" Japanese Version Copyright (c) 1997 Kazuyuki Tanisako .\" all rights reserved. .\" Translated 1998-02-10, Kazuyuki Tanisako .\" Updated 1998-09-23, Kazuyuki Tanisako .\" Updated 2006-07-19, Akihiro MOTOKI , LDP v2.36 .\" .TH PASSWD 5 1998-01-05 "Linux" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O passwd \- password file passwd \- パスワードファイル .\"O .SH DESCRIPTION .SH 説明 .\"O .B Passwd .\"O is a text file, that contains a list of the system's accounts, .\"O giving for each account some useful information like user ID, .\"O group ID, home directory, shell, etc. .B passwd ファイルは、そのシステムのアカウントリストを保持するテキストファイルである。 アカウント毎に、ユーザー ID、グループ ID、ホームディレクトリ、 使用する shell コマンドの種類、等の有用な情報を提供している。 .\"O Often, it also contains the encrypted passwords for each account. .\"O It should have general read permission (many utilities, like .\"O .BR ls (1) .\"O use it to map user IDs to usernames), but write access only for the .\"O superuser. また、各アカウントの暗号化されたパスワードを保持する場合もある。 パスワードファイルのアクセス許可は、全ユーザーに 読み出しの許可を与え .RI ( ls (1) 等の多くのユーティリティではユーザー ID をユーザー名に 対応させるのに .B passwd ファイルを使用する)、 書き込み許可はスーパーユーザーにのみ与えるようにすべきである。 .PP .\"O In the good old days there was no great problem with this general .\"O read permission. .\"O Everybody could read the encrypted passwords, but the .\"O hardware was too slow to crack a well-chosen password, and moreover, the .\"O basic assumption used to be that of a friendly user-community. .\"O These days many people run some version of the shadow password suite, where .\"O .I /etc/passwd .\"O has asterisks (*) instead of encrypted passwords, .\"O and the encrypted passwords are in .\"O .I /etc/shadow .\"O which is readable by the superuser only. 古き良き時代には、この全ユーザーに対する読み取り許可は 特別な問題を起こさなかった。誰でも暗号化されたパスワードを 読むことが出来たが、上手に選ばれたパスワードを破るのには 当時のハードウェアの速度はあまりに遅かったし、それに加えて 友好的なユーザー社会であることを基本的な前提としていた。 最近では多くの人が、何らかのバージョンの shadow password suite (シャドウ・パスワード機能を実現するためのプログラム群) を動かしている。その場合 .I /etc/passwd ファイルのパスワード欄には、暗号化されたパスワードの代わりに アスタリスク (*) が設定される。暗号化されたパスワードは .I /etc/shadow ファイルに保持される。 .I /etc/shadow ファイルはスーパーユーザーだけが読み出すことができる。 .PP .\"O Regardless of whether shadow passwords are used, many sysadmins .\"O use an asterisk in the encrypted password field to make sure .\"O that this user can not authenticate him- or herself using a .\"O password. .\"O (But see the Notes below.) shadow password が使われているかどうかにはよらず、多くのシステム 管理者は、暗号化パスワード欄にアスタリスクを設定することで、 そのユーザーがパスワードでの認証が受けられないようにしている (下記の「注意」の項を参照)。 .PP .\"O If you create a new login, first put an asterisk in the password field, .\"O then use .\"O .BR passwd (1) .\"O to set it. 新しいユーザーを登録する場合には、パスワード欄にアスタリスクを設定しておき .BR passwd (1) コマンドにより設定を行うようにする。 .PP .\"O There is one entry per line, and each line has the format: パスワードファイルは 1 行ごとに 1 エントリを持ち、 各行の書式は以下の通りである: .sp .RS account:password:UID:GID:GECOS:directory:shell .RE .sp .\"O The field descriptions are: 各欄の説明: .RS .TP 1.0in .I account .\"O the name of the user on the system. .\"O It should not contain capital letters. そのシステムでのユーザー名。大文字を含まないようにする。 .TP .I password .\"O the encrypted user password, an asterisk (*), or the letter \(aqx\(aq. .\"O (See .\"O .BR pwconv (8) .\"O for an explanation of \(aqx\(aq.) ユーザーの暗号化されたパスワード、アスタリスク、または文字 \(aqx\(aq (\(aqx\(aq の説明については .BR pwconv (8) を参照)。 .TP .I UID .\"O the numerical user ID. ユーザー ID 番号。 .TP .I GID .\"O the numerical primary group ID for this user. ユーザーが属するプライマリグループ ID 番号。 .TP .I GECOS .\"O This field is optional and only used for informational purposes. .\"O Usually, it contains the full username. .\"O GECOS means General Electric .\"O Comprehensive Operating System, which has been renamed to GCOS when .\"O GE's large systems division was sold to Honeywell. .\"O Dennis Ritchie has reported: "Sometimes we sent printer output or .\"O batch jobs to the GCOS machine. .\"O The gcos field in the password file was a place to stash the .\"O information for the $IDENTcard. .\"O Not elegant." 本欄は省略可能で、情報提供の目的のみに使われる。 ユーザーのフルネームを設定することが多い。GECOS は General Electric Comprehensive Operating System を意味しており、GE 社の大規模システム部門 が Honeywell 社に売却された際に GCOS へと変更された。Dennis Ritchie 氏は 次のように言っている:「時々プリンタ出力や、 バッチジョブを GCOS マシンに送ったりするが、 パスワードファイルの gcos 欄は $IDENT カード用の情報を 隠しておくための場所なんだ。まるっきりエレガントじゃない。」 .TP .I directory .\"O the user's .\"O .B $HOME .\"O directory. ユーザーの .B $HOME ディレクトリ。 .TP .I shell .\"O the program to run at login (if empty, use .\"O .IR /bin/sh ). .\"O If set to a nonexisting executable, the user will be unable to login .\"O through .\"O .BR login (1). ログイン時に動くプログラム名 (空欄の場合 .I /bin/sh が使われる)。 存在しない実行プログラムが設定された場合、 .BR login (1) によるシステムへのログインはできなくなる。 .RE .\"O .SH FILES .SH ファイル .I /etc/passwd .\"O .SH NOTES .SH 注意 .\"O If you want to create .\"O user groups, their GIDs must be equal and there must be an entry in .\"O \fI/etc/group\fP, or no group will exist. ユーザーグループを作りたい場合には、同じグループに属する ユーザーの GID は同じ値とし、その GID を \fI/etc/group\fP の中に 定義しておく必要がある。そうしないとグループを作ったことにはならない。 .PP .\"O If the encrypted password is set to an asterisk, the user will be unable .\"O to login using .\"O .BR login (1), .\"O but may still login using .\"O .BR rlogin (1), .\"O run existing processes and initiate new ones through .\"O .BR rsh (1), .\"O .BR cron (8), .\"O .BR at (1), .\"O or mail filters, etc. .\"O Trying to lock an account by simply changing the .\"O shell field yields the same result and additionally allows the use of .\"O .BR su (1). 暗号化パスワードとしてアスタリスクを設定すると、 .BR login (1) を使ってのログインができなくなるが、 .BR rlogin (1) ではまだログインができるし、 .BR rsh (1), .BR cron (8), .BR at (1) やメイルのフィルタ等を使い、現存するプロセスを 実行させたり、新たなプロセスを起動したりすることができる。 使用する shell の欄を、単に変更することでアカウントを 使えないようにするのも同様の結果となる。その場合にはさらに .BR su (1) も有効なまま残ってしまう。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR login (1), .BR passwd (1), .BR su (1), .BR getpwent (3), .BR getpwnam (3), .BR group (5), .BR shadow (5)