Node:authentication, Next:configuration, Up:Programs
Some mail utilities provide access to their services only after
verifying that the user is actually the person he is claiming
to be. Such programs are, for example, pop3d
and
imap4d
. The process of the verification is broken
down into two stages: authorization and authentication.
In authorization stage the program retrieves the information
about a particular user. In authentication stage, this information
is compared against the user-supplied credentials. Only if both stages
succeed is the user allowed to use the service.
A set of modules is involved in performing each stage. For example, the authorization stage can retrieve the user description from various sources: system database, sql database, virtual domain table, etc. Each module is responsible for retrieving the description from a particular source of information. The modules are arranged in a module list. The modules from the list are invoked in turn, until either a one of them succeeds or the list is exhausted. In latter case the authorization fails. Otherwise the data returned by the succeeded module are used in authentication.
Similarly, authentication may be performed in several ways. The authentication modules are also grouped in a list. Each module is tried in turn until either a module succeeds, in which case the authentication succeeds, or the end of the list is reached.
We represent the module lists as column-separated lists of module
names. For example, the authorization list
system:sql:virtdomains
means that first the system user database (/etc/password
) is
searched for a description of a user in question. If the search fails,
the sql database is searched. Finally, if it also fails, the
search is performed in the virtual domain database.
Note, that some authentication and/or authorization modules may
be disabled when configuring the package before compilation. The names
of the disabled modules are nevertheless available for use in runtime
configuration options, but they represent a "fail-only" functionality,
e.g. if the package was compiled without sql support then the
module sql
in the above example will always fail, thus passing
the execution on to the next module.
The modules available for use in authorization list are:
/etc/password
).
--sql-
options (see auth) is used to configure
access to the database.
The modules available for use in authentication list are:
/etc/shadow
file on systems that support it.
--sql-getpass
option
(see auth).
--pam-service
option (see auth)
Unless overridden by --authentication
command line option,
the list of authentication modules is:
generic:system:pam:sql
Unless overridden by --authorization
command line option,
the list of authorization modules is:
system:sql:virtdomains