1998-08-10 19:42:37 +00:00
|
|
|
\section{\module{pwd} ---
|
1999-03-02 16:37:17 +00:00
|
|
|
The password database}
|
1998-07-23 17:59:49 +00:00
|
|
|
|
1999-03-02 16:37:17 +00:00
|
|
|
\declaremodule{builtin}{pwd}
|
1999-03-02 17:03:42 +00:00
|
|
|
\platform{Unix}
|
1998-07-23 17:59:49 +00:00
|
|
|
\modulesynopsis{The password database (\function{getpwnam()} and friends).}
|
1994-01-02 01:22:07 +00:00
|
|
|
|
|
|
|
This module provides access to the \UNIX{} password database.
|
|
|
|
It is available on all \UNIX{} versions.
|
|
|
|
|
|
|
|
Password database entries are reported as 7-tuples containing the
|
1998-08-14 17:05:17 +00:00
|
|
|
following items from the password database (see \code{<pwd.h>}), in order:
|
1994-01-02 01:22:07 +00:00
|
|
|
\code{pw_name},
|
|
|
|
\code{pw_passwd},
|
|
|
|
\code{pw_uid},
|
|
|
|
\code{pw_gid},
|
|
|
|
\code{pw_gecos},
|
|
|
|
\code{pw_dir},
|
|
|
|
\code{pw_shell}.
|
|
|
|
The uid and gid items are integers, all others are strings.
|
1999-03-02 16:37:17 +00:00
|
|
|
\exception{KeyError} is raised if the entry asked for cannot be found.
|
1994-01-02 01:22:07 +00:00
|
|
|
|
|
|
|
It defines the following items:
|
|
|
|
|
|
|
|
\begin{funcdesc}{getpwuid}{uid}
|
|
|
|
Return the password database entry for the given numeric user ID.
|
|
|
|
\end{funcdesc}
|
|
|
|
|
|
|
|
\begin{funcdesc}{getpwnam}{name}
|
|
|
|
Return the password database entry for the given user name.
|
|
|
|
\end{funcdesc}
|
|
|
|
|
|
|
|
\begin{funcdesc}{getpwall}{}
|
|
|
|
Return a list of all available password database entries, in arbitrary order.
|
|
|
|
\end{funcdesc}
|