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