This module provides access to the Unix user account and password database. It is available on all Unix versions.
Password database entries are reported as 7-tuples containing the
following items from the password database (see
<pwd.h>), in order:
||Optional encrypted password|
||Numerical user ID|
||Numerical group ID|
||User name or comment field|
||User home directory|
||User command interpreter|
The uid and gid items are integers, all others are strings. KeyError is raised if the entry asked for cannot be found.
Note: In traditional Unix the field
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 only contains a asterisk (
'*') or the
letter "x" where the encrypted password is stored in a file
/etc/shadow which is not world readable.
It defines the following items: