"pwd" --- The password database
*******************************

======================================================================

このモジュールは Unix のユーザアカウントとパスワードのデータベースへの
アクセスを提供します。全ての Unix 系 OS で利用できます。

Availability: Unix, not Emscripten, not WASI.

パスワードデータベースの各エントリはタプルのようなオブジェクトで提供さ
れ、それぞれの属性は "passwd" 構造体のメンバに対応しています(下の属性
欄については、"<pwd.h>" を見てください):

+---------+-----------------+-------------------------------+
| インデ  | 属性            | 意味                          |
| ックス  |                 |                               |
|=========|=================|===============================|
| 0       | "pw_name"       | ログイン名                    |
+---------+-----------------+-------------------------------+
| 1       | "pw_passwd"     | 暗号化されたパスワード        |
|         |                 | (optional))                   |
+---------+-----------------+-------------------------------+
| 2       | "pw_uid"        | ユーザID(UID)                 |
+---------+-----------------+-------------------------------+
| 3       | "pw_gid"        | グループID(GID)               |
+---------+-----------------+-------------------------------+
| 4       | "pw_gecos"      | 実名またはコメント            |
+---------+-----------------+-------------------------------+
| 5       | "pw_dir"        | ホームディレクトリ            |
+---------+-----------------+-------------------------------+
| 6       | "pw_shell"      | シェル                        |
+---------+-----------------+-------------------------------+

UIDとGIDは整数で、それ以外は全て文字列です。検索したエントリが見つから
ないと "KeyError" が発生します。

注釈:

  In traditional Unix the field "pw_passwd" usually contains a
  password encrypted with a DES derived algorithm (see module
  "crypt").  However most modern unices  use a so-called *shadow
  password* system.  On those unices the *pw_passwd* field only
  contains an asterisk ("'*'") or the  letter "'x'" where the
  encrypted password is stored in a file "/etc/shadow" which is not
  world readable.  Whether the *pw_passwd* field contains anything
  useful is system-dependent.  If available, the "spwd" module should
  be used where access to the encrypted password is required.

このモジュールでは以下の内容を定義しています:

pwd.getpwuid(uid)

   与えられたUIDに対応するパスワードデータベースのエントリを返します。

pwd.getpwnam(name)

   与えられたユーザ名に対応するパスワードデータベースのエントリを返し
   ます。

pwd.getpwall()

   パスワードデータベースの全てのエントリを、任意の順番で並べたリスト
   を返します。

参考:

  "grp" モジュール
     このモジュールに似た、グループデータベースへのアクセスを提供する
     モジュール。

  Module "spwd"
     An interface to the shadow password database, similar to this.
