blob: 6310498f048f26127dd418b2339a55828ad269a1 [file] [log] [blame]
Guido van Rossum5fdeeea1994-01-02 01:22:07 +00001\section{Built-in Module \sectcode{grp}}
2
3\bimodindex{grp}
4This module provides access to the \UNIX{} group database.
5It is available on all \UNIX{} versions.
6
7Group database entries are reported as 4-tuples containing the
8following items from the group database (see \file{<grp.h>}), in order:
9\code{gr_name},
10\code{gr_passwd},
11\code{gr_gid},
12\code{gr_mem}.
13The gid is an integer, name and password are strings, and the member
14list is a list of strings.
15(Note that most users are not explicitly listed as members of the
16group(s) they are in.)
17An exception is raised if the entry asked for cannot be found.
18
19It defines the following items:
20
21\renewcommand{\indexsubitem}{(in module grp)}
22\begin{funcdesc}{getgrgid}{gid}
23Return the group database entry for the given numeric group ID.
24\end{funcdesc}
25
26\begin{funcdesc}{getgrnam}{name}
27Return the group database entry for the given group name.
28\end{funcdesc}
29
30\begin{funcdesc}{getgrall}{}
Guido van Rossum6bb1adc1995-03-13 10:03:32 +000031Return a list of all available group entries, in arbitrary order.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000032\end{funcdesc}