head	1.5;
access;
symbols;
locks; strict;
comment	@# @;


1.5
date	97.04.05.06.49.14;	author morgan;	state Exp;
branches;
next	1.4;

1.4
date	97.02.15.18.29.20;	author morgan;	state Exp;
branches;
next	1.3;

1.3
date	97.01.04.18.51.45;	author morgan;	state Exp;
branches;
next	1.2;

1.2
date	96.11.30.20.57.28;	author morgan;	state Exp;
branches;
next	1.1;

1.1
date	96.11.17.19.59.04;	author morgan;	state Exp;
branches;
next	;


desc
@Have changed the name of the pam.sgml file to pam_source.sgml
In this way I can automate the inclusion of the module sgml files.
@


1.5
log
@update for .57
@
text
@<!doctype linuxdoc system>

<!--

 $Id: pam_source.sgml,v 1.4 1997/02/15 18:29:20 morgan Exp morgan $

    Copyright (c) Andrew G. Morgan 1996,1997.  All rights reserved.

Redistribution and use in source (sgml) and binary (derived) forms,
with or without modification, are permitted provided that the
following conditions are met:

1. Redistributions of source code must retain the above copyright
   notice, and the entire permission notice in its entirety,
   including the disclaimer of warranties.

2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

3. The name of the author may not be used to endorse or promote
   products derived from this software without specific prior
   written permission.

ALTERNATIVELY, this product may be distributed under the terms of the
GNU General Public License, in which case the provisions of the GNU
GPL are required INSTEAD OF the above restrictions.  (This clause is
necessary due to a potential bad interaction between the GNU GPL and
the restrictions contained in a BSD-style copyright.)

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

 -->

<article>

<title>The Linux-PAM System Administrators' Guide
<author>Andrew G. Morgan, <tt>morgan@@parc.power.net</tt>
<date>DRAFT v0.57 1997/4/4
<abstract>
This manual documents what a system-administrator needs to know about
the <bf>Linux-PAM</bf> library. It covers the correct syntax of the
PAM configuration file and discusses strategies for maintaining a
secure system.
</abstract>

<!-- Table of contents -->
<toc>

<!-- Begin the document -->

<sect>Introduction

<p><bf/Linux-PAM/ (Pluggable Authentication Modules for Linux) is a
suite of shared libraries that enable the local system administrator
to choose how applications authenticate users.

<p>In other words, without (rewriting and) recompiling a PAM-aware
application, it is possible to switch between the authentication
mechanism(s) it uses. Indeed, one may entirely upgrade the local
authentication system without touching the applications themselves.

<p>Historically an application that has required a given user to be
authenticated, has had to be compiled to use a specific authentication
mechanism.  For example, in the case of traditional UN*X systems, the
identity of the user is verified by the user entering a correct
password.  This password, after being prefixed by a two character
``salt'', is encrypted (with crypt(3)). The user is then authenticated
if this encrypted password is identical to the second field of the
user's entry in the system password database (the <tt>/etc/passwd</tt>
file).  On such systems, most if not all forms of privileges are
granted based on this single authentication scheme. Privilege comes in
the form of a personal user-identifier (<tt/uid/) and membership of
various groups. Services and applications are available based on the
personal and group identity of the user. Traditionally, group
membership has been assigned based on entries in the
<tt>/etc/group</tt> file.

<p>
Unfortunately, increases in the speed of computers and the
widespread introduction of network based computing, have made once
secure authentication mechanisms, such as this, vulnerable to
attack. In the light of such realities, new methods of authentication
are continuously being developed.

<p>
It is the purpose of the <bf/Linux-PAM/ project to separate the
development of privilege granting software from the development of
secure and appropriate authentication schemes.  This is accomplished
by providing a library of functions that an application may use to
request that a user be authenticated. This PAM library is configured
locally with a system file, <tt>/etc/pam.conf</tt> (or a series of
configuration files located in <tt>/etc/pam.d/</tt>) to authenticate a
user request via the locally available authentication modules. The
modules themselves will usually be located in the directory
<tt>/usr/lib/security</tt> and take the form of dynamically loadable
object files (see <tt/dlopen(3)/).

<sect>Some comments on the text<label id="text-conventions">

<p>
Before proceeding to read the rest of this document, it should be
noted that the text assumes that certain files are placed in certain
directories.  Where they have been specified, the conventions we adopt
here for locating these files are those of the relevant RFC (RFC-86.0,
see <ref id="see-also-sec" name="bibliography">).  If you are using a
distribution of Linux (or some other operating system) that supports
PAM but chooses to distribute these files in a diferent way, you
should be careful when copying examples directly from the text.

<p>
As an example of the above, where it is explicit, the text assumes
that PAM loadable object files (the <em/modules/) are to be located in
the following directory: <tt>/usr/lib/security/</tt>. However, Red Hat
Linux, in agreement with the Linux File System Standard (the FSSTND),
places these files in <tt>/lib/security</tt>. Please be careful to
perform the necessary transcription when using the examples from the
text.

<sect>Overview<label id="overview-section">

<p>
For the uninitiated, we begin by considering an example.  We take an
application that grants some service to users; <em/login/ is one such
program. <em/Login/ does two things, it first establishes that the
requesting user is whom they claim to be and second provides them with
the requested service: in the case of <em/login/ the service is a
command shell running with the identity of the user.

<p>
Traditinally, the former step is achieved by the <em/login/
application prompting the user for a password and then verifying that
it agrees with that located on the system; hence verifying that the
so far as the system is concerned the user is who they claim to be.
This is the task that is delegated to <bf/Linux-PAM/.

<p>
From the perspective of the application programmer (in this case the
person that wrote the <em/login/ application), <bf/Linux-PAM/ takes
care of the task of verifying the identity of the user.

<p>
The flexibility of <bf/Linux-PAM/ is that <em/you/, the system
administrator, have the freedom to stipulate which authentication
scheme is to be used. You have the freedom to set the scheme for
any/all PAM-aware applications on your Linux system. That is, you can
authenticate from anything as naive as <em/simple trust/
(<tt/pam_permit/) to something as paranoid as a combination of a
retinal scan, a voice print and a one-time password!

<p>
To illustrate the flexibility you face, consider the following
situation: a system administrator (parent) wishes to improve the
mathematical ability of her users (children). She can configure their
favorite ``Shoot 'em up game'' (PAM-aware of course) to authenticate
them with a request for the product of a couple of random numbers less
than 12. It is clear that if the game is any good they will soon learn
their <em/multiplication tables/. As they mature, the authentication
can be upgraded to include (long) division!

<p>
<bf/Linux-PAM/ deals with four separate types of (management)
task. These are: <em/authentication management/; <em/account
management/; <em/session management/; and <em/password management/.
The association of the preferred management scheme with the behavior
of an application is made with entries in the relevant <bf/Linux-PAM/
configuration file.
The management functions are performed by <em/modules/ specified in
the configuration file. The syntax for this file is discussed
in the section <ref id="configuration" name="below">.

<p>
Here is a figure that describes the overall organization of
<bf/Linux-PAM/.
<tscreen>
<verb>
	 +----------------+
	 | application: X |
         +----------------+	  /  +----------+     +================+
       	 | authentication-[---->--\--] Linux-   |--<--| PAM config file|
	 |       +        [----<--/--] 	 PAM    |     |================|
	 |[conversation()][--+    \  |          |     | X auth .. a.so |
	 +----------------+  |    /  +-n--n-----+     | X auth .. b.so |
	 |                |  |       __|  |           |           _____/
	 |  service user  |  A      |  	  |           |____,-----' 
	 |                |  |      V  	  A	        	   
	 +----------------+  +------|-----|---------+ -----+------+
	                        +---u-----u----+    |	   |	  |
			        |   auth....   |--[ a ]--[ b ]--[ c ]
				+--------------+
				|   acct....   |--[ b ]--[ d ]
				+--------------+
				|   password   |--[ b ]--[ c ]
				+--------------+
				|   session    |--[ e ]--[ c ]
				+--------------+
</verb>
</tscreen>
By way of explanation, the left of the figure represents the
application; application X. Such an application interfaces with the
<bf/Linux-PAM/ library and knows none of the specifics of its
configured authentication method.  The <bf/Linux-PAM/ library (in the
center) consults the contents of the PAM configuration file and
loads the modules that are appropriate for application-X. These
modules fall into one of four management groups (lower-center) and are
stacked in the order they appear in the configuaration file. These
modules, when called by <bf/Linux-PAM/, perform the various
authentication tasks for the application. Textual information,
required from/or offered to the user, can be exchanged through the use
of the application-supplied <em/conversation/ function.

<sect>The Linux-PAM configuration file
<label id="configuration">

<p>
<bf/Linux-PAM/ is designed to provide the system administrator with a
great deal of flexibility in configuring the privilege granting
applications of their system. The local configuration of those aspects
of system security controlled by <tt/Linux-PAM/ is contained in one of
two places: either the single system file, <tt>/etc/pam.conf</tt>; or
the <tt>/etc/pam.d/</tt> directory.  In this section we discuss the
correct syntax of and generic options respected by entries to these
files.

<sect1>Configuration file syntax

<p>
The reader should note that the <bf/Linux-PAM/ specific tokens in this
file are case <em/insensitive/. The module paths, however, are case
sensitive since they indicate a file's <em/name/ and reflect the case
dependence of typical Linux file-systems. The case-sensitivity of the
arguments to any given module is defined for each module in turn.

<p>
In addition to the lines described below, there are two <em/special/
characters provided for the convenience of the system administrator:
comments are preceded by a `<tt/&num;/' and extend to the
next end-of-line; also, module specification lines may be extended
with a `<tt/&bsol;/' escaped newline.

<p>
A general configuration line of the <tt>/etc/pam.conf</tt> file has
the following form:
<tscreen>
<verb>
service-name   module-type   control-flag   module-path   arguments
</verb>
</tscreen>
Below, we explain the meaning of each of these tokens. The second (and
more recently adopted) way of configuring <bf/Linux-PAM/ is via the
contents of the <tt>/etc/pam.d/</tt> directory. Once we have explained
the meaning of the above tokens, we will describe this method.

<p>
<descrip>
<tag><tt/service-name/</tag>
The name of the service associated with this entry. Frequently the
service name is the conventional name of the given application. For
example, `<tt/ftpd/', `<tt/rlogind/' and `<tt/su/', <em/etc./ .

<p>
There is a special <tt/service-name/, reserved for defining a default
authentication mechanism. It has the name `<tt/OTHER/' and may be
specified in either lower or upper case characters. Note, when there
is a module specified for a named service, the `<tt/OTHER/' entries
are ignored.

<tag><tt/module-type/</tag>
One of (currently) four types of module. The four types are as
follows:
<itemize>
<item> <tt/auth/; this module type provides two aspects of
authenticating the user. Firstly, it establishes that the user is who
they claim to be, by instructing the application to prompt the user
for a password or other means of identification. Secondly, the module
can grant <tt/group/ membership (independently of the
<tt>/etc/groups</tt> file discussed above) or other privileges through
its <em/credential/ granting properties.

<item> <tt/account/; this module performs non-authentication based
account management. It is typically used to restrict/permit access to
a service based on the time of day, currently available system
resources (maximum number of users) or perhaps the location of the
applicant user---`<tt/root/' login only on the console.

<item> <tt/session/; primarily, this module is associated with doing
things that need to be done for the user before/after they can be
given service.  Such things include the logging of information
concerning the opening/closing of some data exchange with a user,
mounting directories, etc. .

<item> <tt/password/; this last module type is required for updating the
authentication token associated with the user. Typically, there is one
module for each `challenge/response' based authentication (<tt/auth/)
module-type.

</itemize>

<tag><tt/control-flag/</tag>

One of (currently) four tokens that indicate the severity of concern
associated with the success or failure of a given module.
<bf/Linux-PAM/ provides for the <em/stacking/ of similar modules,
providing a method of sequentially exposing the user to more than one
authentication mechanism per service application.  The application is
not made aware of the individual success or failure of modules listed
in the `<tt>/etc/pam.conf</tt>' file.  Instead, it receives a summary
<em/success/ or <em/fail/ response from the <bf/Linux-PAM/
library. The order of execution of these modules is that of the
entries in the <tt>/etc/pam.conf</tt> file; earlier entries are
executed before later ones.

<p>
The policy for determining this response is based on these
three <tt/control-flag/s:

<itemize>

<item> <tt/required/; this indicates that the success of the module is
required for the <tt/module-type/ facility to succeed. Failure of this
module will not be apparent to the user until all of the remaining
modules (of the same <tt/module-type/) have been executed.

<item> <tt/requisite/; like <tt/required/, however, in the case that
such a module returns a failure, control is directly returned to the
application.  The return value is that associated with the <em/first/
<tt/required/ or <tt/requisite/ module to fail.  Note, this flag can be
used to protect against the possibility of a user getting the
opportunity to enter a password over an unsafe medium.  It is
conceivable that such behavior might inform an attacker of valid
accounts on a system. This possibility should be weighed against the
not insignificant concerns of exposing a sensitive password in a
hostile environment.

<item> <tt/sufficient/; the success of this module is deemed
`<em/sufficient/' to satisfy the <bf/Linux-PAM/ library that this
module-type has succeeded in its purpose. In the event that no
previous <tt/required/ module has failed, no more `<em/stacked/'
modules of this type are invoked. (Note, in this case subsequent
<tt/required/ modules are <bf/not/ invoked.). A failure of this module
is not deemed as fatal to satisfying the application that this
<tt/module-type/ has succeeded.

<item> <tt/optional/; as its name suggests, this <tt/control-flag/
marks the module as not being critical to the success or failure of
the user's application for service. However, in the absence of any
successes of previous or subsequent stacked modules this module will
determine the nature of the response to the application.

</itemize>

<tag> <tt/module-path/</tag>

The path-name of the dynamically loadable object file; <em/the
pluggable module/ itself. If the first character of the module path is
`<tt>/</tt>', it is assumed to be a complete path. If this is not the
case, the given module path is appended to the default module path:
<tt>/usr/lib/security</tt> (but see the notes <ref
id="text-conventions" name="above">).

<tag> <tt/args/</tag>

The <tt/args/ are a list of tokens that are passed to the module when
it is invoked. Much like arguments to a typical Linux shell command.
Generally, valid arguments are optional and are specific to any given
module. Invalid arguments are ignored by a module, however, when
encountering an invalid argument, the module is required to write an
error to <tt/syslog(3)/. For a list of <em/generic/ options see the
next section.

</descrip>

<p>
Any line, in <tt>/etc/pam.conf</tt>, that is not formatted correctly
is ignored by <bf/Linux-PAM/; however, a corresponding error is
written to the system log files with a call to <tt/syslog(3)/.

<sect1>Directory based configuration

<p>
More flexible than the single configuration file, as of version 0.56,
it is possible to configure <tt>libpam</tt> via the contents of the
<tt>/etc/pam.d/</tt> directory.  In this case the directory is filled
with files each of which has a filename equal to a service-name (in
lower-case): it is the personal configuration file for the named
service.  <bf>The existence of an <tt>/etc/pam.d/</tt> directory means
<tt>libpam</tt> will completely <em>ignore</em> the contents of
<tt>/etc/pam.conf</tt>.</bf>

The syntax of this file is similar to that of the
<tt>/etc/pam.conf</tt> file and is made up of lines of the following
form:
<tscreen>
<verb>
module-type   control-flag   module-path   arguments
</verb>
</tscreen>
The only difference being that the <tt>service-name</tt> is not
present. The service name is known for the file to have been read by
<tt>libpam</tt>.

<p>
This method of configuration has a number of advantages over the
single file approach. We list them here to assist the reader in
deciding which scheme to adopt:

<p>
<itemize>

<item>A lower chance of misconfiguring an application. There is one
less field to mis-type when editing the configuration files by hand.

<item>Easier to maintain. One application may be reconfigured without
risk of interfering with other applications on the system.

<item>It is possible to symbolically link different services
configuration files to a single file. This makes it easier to keep the
system policy for access consistent across different applications.
(It should be noted, to conserve space, it is equally possible to
<em>hard</em> link a number of configuration files. However, care
should be taken when administering this arrangement as editing a hard
linked file is likely to break the link.)

<item>A potential for quicker configuration file parsing. Only the
relevant entries are parsed when a service gets bound to its modules.

<item>It is possible to limit read access to individual <bf/Linux-PAM/
configuration files using the file protections of the filesystem.

</itemize>

<sect1>Generic optional arguments

<p>
The following are optional arguments which are likely to be understood
by any module. Arguments (including these) are in general
<em/optional/.

<p>
<descrip>
<tag><tt/debug/</tag>

Use the <tt/syslog(3)/ call to log debugging information to the system
log files.

<tag> <tt/no_warn/</tag>

Instruct module to not give warning messages to the application.

<tag> <tt/use_first_pass/</tag>

The module should not prompt the user for a password. Instead, it
should obtain the previously typed password (from the preceding
<tt/auth/ module), and use that. If that doesn't work, then the user
will not be authenticated. (This option is intended for <tt/auth/
and <tt/password/ modules only).

<tag> <tt/try_first_pass/</tag>

The module should attempt authentication with the previously typed
password (from the preceding <tt/auth/ module). If that doesn't work,
then the user is prompted for a password. (This option is intended for
<tt/auth/ modules only).

<tag> <tt/use_mapped_pass/</tag>

This argument is not currently supported by any of the modules in the
<bf/Linux-PAM/ distribution because of possible consequences
associated with U.S. encryption exporting restrictions. Within the
U.S., module developers are, of course, free to implement it (as are
developers in other countries). For compatibility reasons we describe
its use as suggested in the <bf/DCE-RFC 86.0/, see section <ref
id="see-also-sec" name="bibliography"> for a pointer to this document.

<p>
The <tt/use_mapped_pass/ argument instructs the module to take the
clear text authentication token entered by a previous module (that
requests such a token) and use it to generate an encryption/decryption
key with which to safely store/retrieve the authentication token
required for this module. In this way the user can enter a single
authentication token and be quietly authenticated by a number of
stacked modules.  Obviously a convenient feature that necessarily
requires some reliably strong encryption to make it secure.
This argument is intended for the <tt/auth/ and <tt/password/ module
types only.

</descrip>

<sect1>Example configuration file entries

<p>
In this section, we give some examples of entries that can be present
in the <bf/Linux-PAM/ configuration file. As a first attempt at
configuring your system you could do worse than to implement these.

<sect2>Default policy

<p>
If a system is to be considered secure, it had better have a
reasonably secure `<tt/OTHER/' entry. The following is a paranoid
setting (which is not a bad place to start!):
<tscreen>
<verb>
#
# default; deny access
#
OTHER	auth	 required	/usr/lib/security/pam_deny.so
OTHER	account	 required	/usr/lib/security/pam_deny.so
OTHER	password required	/usr/lib/security/pam_deny.so
OTHER	session	 required	/usr/lib/security/pam_deny.so
</verb>
</tscreen>
Whilst fundamentally a secure default, this is not very sympathetic to
a misconfigured system. For example, such a system is vulnerable to
locking everyone out should the rest of the file become badly written.

<p>
The module <tt/pam_deny/ (documented in a later section) is not very
sophisticated. For example, it logs no information when it is invoked
so unless the users of a system contact the administrator when failing
to execute a service application, the administrator may go for a long
while in ignorance of the fact that his system is misconfigured.

<p>
The addition of the following line before those in the above example
would provide a suitable warning to the administrator.
<tscreen>
<verb>
#
# default; wake up! This application is not configured
#
OTHER	auth	 required	/usr/lib/security/pam_warn.so
OTHER	password required	/usr/lib/security/pam_warn.so
</verb>
</tscreen>
Having two ``<tt/OTHER auth/'' lines is an example of stacking.

<p>
On a system that uses the <tt>/etc/pam.d/</tt> configuration, the
corresponding default setup would be achieved with the following file:
<tscreen>
<verb>
#
# default configuration: /etc/pam.d/other
#
auth	 required	/usr/lib/security/pam_warn.so
auth	 required	/usr/lib/security/pam_deny.so
account	 required	/usr/lib/security/pam_deny.so
password required	/usr/lib/security/pam_warn.so
password required	/usr/lib/security/pam_deny.so
session	 required	/usr/lib/security/pam_deny.so
</verb>
</tscreen>
This is the only explicit example we give for an <tt>/etc/pam.d/</tt>
file. In general, it should be clear how to transpose the remaining
examples to this configuration scheme.

<p>
On a less sensitive computer, one on which the system administrator
wishes to remain ignorant of much of the power of <tt/Linux-PAM/, the
following selection of lines (in <tt>/etc/pam.conf</tt>) is likely to
mimic the historically familiar Linux setup.
<tscreen>
<verb>
#
# default; standard UNIX access
#
OTHER	auth	 required	/usr/lib/security/pam_unix_auth.so
OTHER	account	 required	/usr/lib/security/pam_unix_acct.so
OTHER	password required	/usr/lib/security/pam_unix_passwd.so
OTHER	session	 required	/usr/lib/security/pam_unix_sess.so
</verb>
</tscreen>
In general this will provide a starting place for most applications.
Unfortunately, most is not all. One application that might require
additional lines is <em/ftpd/ if you wish to enable
<em/anonymous-ftp/.

<p>
To enable anonymous-ftp, the following lines might be used to replace
the default (<tt/OTHER/) ones. (<bf/*WARNING*/ as of 1996/12/28 this
does not work correctly with any ftpd. Consequently, this description
may be subject to change or the application will be fixed.)
<tscreen>
<verb>
#
# ftpd; add ftp-specifics. These lines enable anonymous ftp over
#       standard UNIX access (the listfile entry blocks access to
#	users listed in /etc/ftpusers)
#
ftpd	auth	sufficient  /usr/lib/security/pam_ftp.so
ftpd	auth	required    /usr/lib/security/pam_unix_auth.so use_first_pass
ftpd	auth	required    /usr/lib/security/pam_listfile.so \
			onerr=succeed item=user sense=deny file=/etc/ftpusers
</verb>
</tscreen>
Note, the second line is necessary since the default entries are
ignored by a service application (here <em/ftpd/) if there are
<em/any/ entries in <tt>/etc/pam.conf</tt> for that specified service.
Again, this is an example of authentication module stacking.  Note the
use of the <tt/sufficient/ control-flag. It says that ``if this module
authenticates the user, ignore the subsequent <tt/auth/
modules''. Also note the use of the ``<tt/use_first_pass/''
module-argument, this instructs the UNIX authentication module that it
is not to prompt for a password but rely one already having been
obtained by the ftp module.

<p>
The standard UNIX modules, used above, are strongly tied to using the
default `<tt/libc/' user database functions (see for example, <tt/man
getpwent/).  It is the opinion of the author that these functions are
not sufficently flexible to make full use of the power of
<bf/Linux-PAM/.  For this reason, and as a small plug, I mention in
passing that there is a pluggable replacement for the <tt/pam_unix_../
modules; <tt/pam_pwdb/. See the section below for a more complete
description.

<sect>Security issues of Linux-PAM

<p>
This section will discuss good practices for constructing a secure
<tt>/etc/pam.conf</tt> file. <em>It is currently sadly lacking...</em>

<p>
It is not a good thing to have a weak default (<tt/OTHER/) entry.

<sect>A reference guide for available modules

<p>
Here, we collect together some descriptions of the various modules
available for <bf/Linux-PAM/. In general these modules should be
freely available. Where this is not the case, it will be indicated.

<p>
Also please note the comments contained in the section <ref 
id="text-conventions" name="on text conventions above"> when copying
the examples listed below.

<!-- insert-file MODULES-SGML -->

<sect>Files

<p><descrip>

<tag><tt>/usr/lib/libpam.so.*</tt></tag>

the shared library providing applications with access to
<bf/Linux-PAM/.

<tag><tt>/etc/pam.conf</tt></tag>

the <bf/Linux-PAM/ configuration file.

<tag><tt>/usr/lib/security/pam_*.so</tt></tag>

the primary location for <bf/Linux-PAM/ dynamically loadable object
files; the modules.

</descrip>

<sect>See also<label id="see-also-sec">

<p><itemize>

<item>The <bf/Linux-PAM/ Application Writers' Guide.

<item>The <bf/Linux-PAM/ Module Writers' Guide.

<item>The V. Samar and R. Schemers (SunSoft), ``UNIFIED LOGIN WITH
PLUGGABLE AUTHENTICATION MODULES'', Open Software Foundation Request
For Comments 86.0, October 1995. See this url:
<tt><htmlurl
url="http://www.pilgrim.umass.edu/pub/osf_dce/RFC/rfc86.0.txt"
name="http://www.pilgrim.umass.edu/pub/osf&lowbar;dce/RFC/rfc86.0.txt"></tt>

</itemize>

<sect>Notes

<p>
I intend to put development comments here... like ``at the moment
this isn't actually supported''. At release time what ever is in
this section will be placed in the Bugs section below! :)

<p>
Are we going to be able to support the <tt/use_mapped_pass/ module
argument? Anyone know a cheap (free) good lawyer?!

<p>
<itemize>
<item>
This issue may go away, as Sun have investigated adding a new
management group for mappings. In this way, libpam would have mapping
modules that could securely store passwords using strong cryptography
and in such a way that they need not be distributed with Linux-PAM.
</itemize>

<sect>Author/acknowledgments

<p>
This document was written by Andrew G. Morgan (morgan@@parc.power.net)
with many contributions from
<!-- insert credits here -->
<!--
 an sgml list of people to credit for their contributions to Linux-PAM
 $Id: pam_source.sgml,v 1.4 1997/02/15 18:29:20 morgan Exp morgan $
  -->
Craig S. Bell,
Derrick J. Brashear,
Ben Buxton,
Oliver Crow,
Marc Ewing,
Cristian Gafton,
Eric Hester,
Eric Jacksch,
Michael K. Johnson,
David Kinchlea,
Elliot Lee,
Al Longyear,
Marek Michalkiewicz,
Aleph One,
Sean Reifschneider,
Eric Troan,
Theodore Ts'o,
Jeff Uphoff,
Ronald Wahl,
John Wilmes,
Joseph S. D. Yao
and
Alex O.  Yuriev.


<p>
Thanks are also due to Sun Microsystems, especially to Vipin Samar and
Charlie Lai for their advice. At an early stage in the development of
<bf/Linux-PAM/, Sun graciously made the documentation for their
implementation of PAM available. This act greatly accelerated the
development of <bf/Linux-PAM/.

<sect>Bugs/omissions

<p>
More PAM modules are being developed all the time. It is unlikely that
this document will ever be truely up to date!

<p>
Currently there is no documentation for PAM-aware applications.

<p>
This manual is unfinished. Only a partial list of people is credited
for all the good work they have done.

<sect>Copyright information for this document

<p>
Copyright (c) Andrew G. Morgan 1996.  All rights reserved.
<newline>
Email: <tt>&lt;morgan@@parc.power.net&gt;</tt>

<p>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

<p>
<itemize>

<item>
1. Redistributions of source code must retain the above copyright
   notice, and the entire permission notice in its entirety,
   including the disclaimer of warranties.

<item>
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

<item>
3. The name of the author may not be used to endorse or promote
   products derived from this software without specific prior
   written permission.

</itemize>

<p>
<bf/Alternatively/, this product may be distributed under the terms of
the GNU General Public License (GPL), in which case the provisions of
the GNU GPL are required <bf/instead of/ the above restrictions.
(This clause is necessary due to a potential bad interaction between
the GNU GPL and the restrictions contained in a BSD-style copyright.)

<p>
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

<p>
<tt>$Id: pam_source.sgml,v 1.4 1997/02/15 18:29:20 morgan Exp morgan $</tt>

</article>
@


1.4
log
@update for .56
@
text
@d5 1
a5 1
 $Id: pam_source.sgml,v 1.3 1997/01/04 18:51:45 morgan Exp morgan $
d49 1
a49 1
<date>DRAFT v0.56 1997/2/9
d716 1
a716 1
 $Id: CREDITS,v 1.2 1997/01/04 22:06:12 morgan Exp morgan $
d816 1
a816 1
<tt>$Id: pam_source.sgml,v 1.3 1997/01/04 18:51:45 morgan Exp morgan $</tt>
@


1.3
log
@update for .55
@
text
@d5 1
a5 1
 $Id: pam_source.sgml,v 1.2 1996/11/30 20:57:28 morgan Exp morgan $
d7 1
a7 1
    Copyright (c) Andrew G. Morgan 1996.  All rights reserved.
d9 3
a11 3
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
d49 1
a49 1
<date>DRAFT v0.55 1996/12/3
d102 2
a103 1
locally with a system file, <tt>/etc/pam.conf</tt>, to authenticate a
d122 7
a128 6
As an example of the above, the text assumes that PAM loadable object
files (the <em/modules/) are to be located in the following directory:
<tt>/usr/lib/security/</tt>. However, Red Hat Linux, in agreement with
the Linux File System Standard (the FSSTND), places these files in
<tt>/lib/security</tt>. Please be careful to perform the necessary
transcription when using the examples from the text.
d176 2
a177 4
of an application is made with entries in the <bf/Linux-PAM/
configuration file, <tt>/etc/pam.conf</tt>.

<p>
d179 2
a180 2
the <tt>/etc/pam.conf</tt> file. The syntax for this file is discussed
in the next section.
d190 1
a190 1
       	 | authentication-[---->--\--] Linux-   |--<--| /etc/pam.conf  |
d213 1
a213 1
center) consults the contents of the <tt>/etc/pam.conf</tt> file and
d222 2
a223 1
<sect>The Linux-PAM configuration file<label id="configuration">
d229 5
a233 4
of system security controlled by <tt/Linux-PAM/ is contained in the
system file, <tt>/etc/pam.conf</tt>.  In this section we discuss the
correct syntax of and generic options respected by entries to this
file.
d249 1
a249 1
with a `<tt/&bsol;/'.
d259 4
a262 1
Here we explain the meaning of each of these tokens.
d365 5
a369 1
pluggable module/ itself.
d388 54
d499 1
a499 1
<sect1>An example <tt>/etc/pam.conf</tt> file
a516 1

a541 1

d549 20
d570 3
a572 3
wishes to remain ignorant of the power of <tt/Linux-PAM/, the
following selection of lines is likely to mimic the historically
familiar Linux setup.
a577 1

a600 1

d619 1
a619 1
The standard UNIX modules used above are strongly tied to using the
d716 1
d720 1
d725 1
d727 1
d742 1
d816 1
a816 1
<tt>$Id: pam_source.sgml,v 1.2 1996/11/30 20:57:28 morgan Exp morgan $</tt>
@


1.2
log
@added lots of information about modules and how to use them
@
text
@d5 1
a5 1
 $Id: pam_source.sgml,v 1.1 1996/11/17 19:59:04 morgan Exp morgan $
d7 1
a7 1
    Copyright (C) Andrew G. Morgan 1996.  All rights reserved.
d49 1
a49 1
<date>DRAFT v0.54 1996/11/18
d306 2
a307 2
One of (currently) three tokens that indicate the severity of
concern associated with the success or failure of a given module.
d309 4
a312 4
providing a method of simultaneously exposing the user to more than
one authentication mechanism.  The application is not made aware of
the individual success or failure of modules listed in the
`<tt>/etc/pam.conf</tt>' file. Instead, it receives a summary
d329 11
d511 3
a513 3
the default (<tt/OTHER/) ones. (*WARNING* as of 1996/11/14 this does
not work correctly with any ftpd. Consequently, this description may
be subject to change or the application will be fixed.)
d517 3
a519 3
# default; add ftp-specifics. These lines enable anonymous ftp over
#          standard UNIX access (the listfile entry blocks access to
#	   users listed in /etc/ftpusers)
d633 25
a657 3
with many contributions from Craig S. Bell, Oliver Crow, Marc Ewing,
Cristian Gafton, Michael K. Johnson, Al Longyear, Marek Michalkiewicz,
Theodore Ts'o, Jeff Uphoff, Joseph S. D. Yao and Alex O.  Yuriev.
d678 55
@


1.1
log
@Initial revision
@
text
@d5 1
a5 1
 $Id: pam.sgml,v 1.9 1996/11/10 19:38:30 morgan Exp morgan $
d49 1
a49 1
<date>DRAFT v0.54 1996/11/13
d108 1
a108 1
<sect>Some comments on the text
d111 8
a118 8
Before proceeding to read the rest of the file, it should be noted
that the text assumes that certain files are placed in certain
directories. Where specified, the conventions for locating these files
are those of the relevant RFC (RFC-86.0, see <ref id="see-also-sec"
name="bibliography">). If you are using a separate distribution of
Linux (or some other operating system) that supports PAM but chooses
to distribute these files in a diferent way, you should be careful
when copying examples from the following text.
d123 4
a126 3
<tt>/usr/lib/security/</tt>. However, the Red Hat distribution of
Linux, places these files in <tt>/lib/security/</tt>. Please perform
the necessary transcription when administrating your system.
d128 1
a128 1
<sect>Overview
d209 12
d222 1
a222 1
<sect>The Linux-PAM configuration file
d291 5
a295 4
<item> <tt/session/; primarily, this module is associated with logging
information concerning the opening/closing of some data exchange with
a user. It is intended for auditing purposes and is likely to be
indispensable for maintaining a secure Linux system.
d358 1
a358 1
error to <tt/syslog(2)/. For a list of <em/generic/ options see the
d366 1
a366 1
written to the system log files with a call to <tt/syslog(2)/.
d379 1
a379 1
Use the <tt/syslog(2)/ call to log debugging information to the system
d408 1
a408 1
its use as suggested in the <bf/DCE-RFC 86.0/, see the section <ref
d479 2
a480 2
following selection of lines is probably sufficient to mimic the
historically familiar Linux setup.
d493 1
a493 1
In general this will prove sufficient for most applications.
d499 4
a502 4
To enable anonymous-ftp, the following lines replace the default
(<tt/OTHER/) ones. (*WARNING* as of 1996/11/14 this does not probably
work correctly with any ftpd. Consequently, this description may be
subject to change or the application will be fixed. ;^)
d507 2
a508 1
#          standard UNIX access
d513 2
d525 1
a525 1
is to not prompt for a password but rely one already having been
d531 1
a531 1
getpwent/. It is the opinion of the author that these functions are
d533 1
a533 1
<bf/Linux-PAM/. For this reason, and as a small plug, I mention in
d549 11
a559 1
#+#+#include modules_summary.sgml
d622 3
a624 3
with many contributions from Marc Ewing, Cristian Gafton, Michael
K. Johnson, Al Longyear, Marek Michalkiewicz, Theodore Ts'o, Jeff
Uphoff, Joseph S. D. Yao and Alex O.  Yuriev.
@
