PNG IHDR ; IDATxܻn0K )(pA7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5 bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô!x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%tMז -lG6mrz2s%9s@-k9=)kB5\+͂ZsٲRn~GRCwIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL /F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ R IENDB`
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 a tuple-like object, whose attributes correspond to the members of the passwd structure (Attribute field below, see <pwd.h>):
Index | Attribute | Meaning |
---|---|---|
0 | pw_name | Login name |
1 | pw_passwd | Optional encrypted password |
2 | pw_uid | Numerical user ID |
3 | pw_gid | Numerical group ID |
4 | pw_gecos | User name or comment field |
5 | pw_dir | User home directory |
6 | pw_shell | 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 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.
It defines the following items:
Return the password database entry for the given numeric user ID.
Return the password database entry for the given user name.
Return a list of all available password database entries, in arbitrary order.