diff options
author | Fred Drake <fdrake@acm.org> | 2000-04-03 20:13:55 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-04-03 20:13:55 (GMT) |
commit | 38e5d27caee56b6958e0034e342abb48e6100390 (patch) | |
tree | 6a0c853da853123dd2e628e8ec187517250c2530 /Doc/lib/libpwd.tex | |
parent | 659ebfa79e891fc5e2480cd66c157970df57c451 (diff) | |
download | cpython-38e5d27caee56b6958e0034e342abb48e6100390.zip cpython-38e5d27caee56b6958e0034e342abb48e6100390.tar.gz cpython-38e5d27caee56b6958e0034e342abb48e6100390.tar.bz2 |
Merged changes from the 1.5.2p2 release.
(Very rough.)
Diffstat (limited to 'Doc/lib/libpwd.tex')
-rw-r--r-- | Doc/lib/libpwd.tex | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/Doc/lib/libpwd.tex b/Doc/lib/libpwd.tex index fb8d693..784f478 100644 --- a/Doc/lib/libpwd.tex +++ b/Doc/lib/libpwd.tex @@ -5,21 +5,33 @@ \platform{Unix} \modulesynopsis{The password database (\function{getpwnam()} and friends).} -This module provides access to the \UNIX{} password database. -It is available on all \UNIX{} versions. +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 \code{<pwd.h>}), in order: -\code{pw_name}, -\code{pw_passwd}, -\code{pw_uid}, -\code{pw_gid}, -\code{pw_gecos}, -\code{pw_dir}, -\code{pw_shell}. + +\begin{tableiii}{r|l|l}{textrm}{Index}{Field}{Meaning} + \lineiii{0}{\code{pw_name}}{Login name} + \lineiii{1}{\code{pw_passwd}}{Optional encrypted password} + \lineiii{2}{\code{pw_uid}}{Numerical user ID} + \lineiii{3}{\code{pw_gid}}{Numerical group ID} + \lineiii{4}{\code{pw_gecos}}{User name or comment field} + \lineiii{5}{\code{pw_dir}}{User home directory} + \lineiii{6}{\code{pw_shell}}{User command interpreter} +\end{tableiii} + The uid and gid items are integers, all others are strings. \exception{KeyError} is raised if the entry asked for cannot be found. +\strong{Note:} In traditional \UNIX{} the field \code{pw_passwd} usually +contains a password encrypted with a DES derived algorithm (see module +\refmodule{crypt}\refbimodindex{crypt}). However most modern unices +use a so-called \emph{shadow password} system. On those unices the +field \code{pw_passwd} only contains a asterisk (\code{'*'}) or the +letter \character{x} where the encrypted password is stored in a file +\file{/etc/shadow} which is not world readable. + It defines the following items: \begin{funcdesc}{getpwuid}{uid} @@ -33,3 +45,8 @@ Return the password database entry for the given user name. \begin{funcdesc}{getpwall}{} Return a list of all available password database entries, in arbitrary order. \end{funcdesc} + + +\begin{seealso} + \seemodule{grp}{An interface to the group database, similar to this.} +\end{seealso} |