blob: 073c19a4b62abfdc9bb3de314d8d80c86f132699 [file] [log] [blame]
Guido van Rossum5fdeeea1994-01-02 01:22:07 +00001\section{Built-in Module \sectcode{pwd}}
Guido van Rossume47da0a1997-07-17 16:34:52 +00002\label{module-pwd}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +00003
4\bimodindex{pwd}
5This module provides access to the \UNIX{} password database.
6It is available on all \UNIX{} versions.
7
8Password database entries are reported as 7-tuples containing the
9following items from the password database (see \file{<pwd.h>}), in order:
10\code{pw_name},
11\code{pw_passwd},
12\code{pw_uid},
13\code{pw_gid},
14\code{pw_gecos},
15\code{pw_dir},
16\code{pw_shell}.
17The uid and gid items are integers, all others are strings.
18An exception is raised if the entry asked for cannot be found.
19
20It defines the following items:
21
22\renewcommand{\indexsubitem}{(in module pwd)}
23\begin{funcdesc}{getpwuid}{uid}
24Return the password database entry for the given numeric user ID.
25\end{funcdesc}
26
27\begin{funcdesc}{getpwnam}{name}
28Return the password database entry for the given user name.
29\end{funcdesc}
30
31\begin{funcdesc}{getpwall}{}
32Return a list of all available password database entries, in arbitrary order.
33\end{funcdesc}