head 1.2;
access;
symbols
RELENG_4_11_0_RELEASE:1.1.1.1.6.2
RELENG_4_11:1.1.1.1.6.2.0.16
RELENG_4_11_BP:1.1.1.1.6.2
RELENG_4_10_0_RELEASE:1.1.1.1.6.2
RELENG_4_10:1.1.1.1.6.2.0.14
RELENG_4_10_BP:1.1.1.1.6.2
RELENG_4_9_0_RELEASE:1.1.1.1.6.2
RELENG_4_9:1.1.1.1.6.2.0.12
RELENG_4_9_BP:1.1.1.1.6.2
RELENG_4_8_0_RELEASE:1.1.1.1.6.2
RELENG_4_8:1.1.1.1.6.2.0.10
RELENG_4_8_BP:1.1.1.1.6.2
RELENG_4_7_0_RELEASE:1.1.1.1.6.2
RELENG_4_7:1.1.1.1.6.2.0.8
RELENG_4_7_BP:1.1.1.1.6.2
RELENG_4_6_2_RELEASE:1.1.1.1.6.2
RELENG_4_6_1_RELEASE:1.1.1.1.6.2
RELENG_4_6_0_RELEASE:1.1.1.1.6.2
RELENG_4_6:1.1.1.1.6.2.0.6
RELENG_4_6_BP:1.1.1.1.6.2
RELENG_4_5_0_RELEASE:1.1.1.1.6.2
RELENG_4_5:1.1.1.1.6.2.0.4
RELENG_4_5_BP:1.1.1.1.6.2
RELENG_4_4_0_RELEASE:1.1.1.1.6.2
RELENG_4_4:1.1.1.1.6.2.0.2
RELENG_4_4_BP:1.1.1.1.6.2
morgan_0_75:1.1.1.2
RELENG_4_3_0_RELEASE:1.1.1.1
RELENG_4_3:1.1.1.1.0.8
RELENG_4_3_BP:1.1.1.1
RELENG_4_2_0_RELEASE:1.1.1.1
RELENG_4_1_1_RELEASE:1.1.1.1
PRE_SMPNG:1.1.1.1
RELENG_4_1_0_RELEASE:1.1.1.1
RELENG_3_5_0_RELEASE:1.1.1.1
RELENG_4_0_0_RELEASE:1.1.1.1
RELENG_4:1.1.1.1.0.6
RELENG_4_BP:1.1.1.1
RELENG_3_4_0_RELEASE:1.1.1.1
RELENG_3_3_0_RELEASE:1.1.1.1
RELENG_3_2_PAO:1.1.1.1.0.4
RELENG_3_2_PAO_BP:1.1.1.1
RELENG_3_2_0_RELEASE:1.1.1.1
RELENG_3_1_0_RELEASE:1.1.1.1
RELENG_3:1.1.1.1.0.2
RELENG_3_BP:1.1.1.1
pam_unpruned:1.1.1.1
morgan_0_65:1.1.1.1
MORGAN:1.1.1;
locks; strict;
comment @# @;
1.2
date 2002.03.08.13.03.40; author des; state dead;
branches;
next 1.1;
1.1
date 98.11.18.01.16.19; author jdp; state Exp;
branches
1.1.1.1;
next ;
1.1.1.1
date 98.11.18.01.16.19; author jdp; state Exp;
branches
1.1.1.1.6.1;
next 1.1.1.2;
1.1.1.2
date 2001.05.03.09.36.03; author markm; state Exp;
branches;
next ;
1.1.1.1.6.1
date 2001.06.07.09.07.29; author markm; state Exp;
branches;
next 1.1.1.1.6.2;
1.1.1.1.6.2
date 2001.06.11.15.28.10; author markm; state Exp;
branches;
next 1.1.1.1.6.3;
1.1.1.1.6.3
date 2012.11.17.07.22.19; author svnexp; state Exp;
branches;
next ;
desc
@@
1.2
log
@Say good-bye, Linux-PAM.
@
text
@
The Linux-PAM System Administrators' Guide
Andrew G. Morgan, morgan@@linux.kernel.orgDRAFT v0.59 1998/1/7
This manual documents what a system-administrator needs to know about
the Linux-PAM library. It covers the correct syntax of the
PAM configuration file and discusses strategies for maintaining a
secure system.
Introduction
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.
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 /etc/passwd
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 (/etc/group file.
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.
It is the purpose of the /etc/pam.conf (or a series of
configuration files located in /etc/pam.d/) to authenticate a
user request via the locally available authentication modules. The
modules themselves will usually be located in the directory
/usr/lib/security and take the form of dynamically loadable
object files (see Some comments on the text. However, Red Hat
Linux, in agreement with the Linux File System Standard (the FSSTND),
places these files in /lib/security. Please be careful to
perform the necessary transcription when using the examples from the
text.
Overview
@
1.1
log
@Initial revision
@
text
@@
1.1.1.1
log
@Initial import of virgin Linux-PAM 0.65, slightly stripped down.
@
text
@@
1.1.1.1.6.1
log
@MFC: Latest vendor PAM code + local fixes.
@
text
@d5 1
a5 1
$Id: pam_source.sgml,v 1.5 2001/03/19 01:46:41 agmorgan Exp $
d7 1
a7 1
Copyright (c) Andrew G. Morgan 1996-2001. All rights reserved.
d48 2
a49 2
Andrew G. Morgan, morgan@@kernel.orgDRAFT v0.75 2001/03/18
d143 1
a143 1
Traditionally, the former step is achieved by the Getting started
The following text was contributed by Seth Chaiklin:
To this point, we have described how PAM should work in an
ideal world, in which all applications are coded properly.
However, at the present time (October 1998), this is far
from the case. Therefore, here are some practical considerations
in trying to use PAM in your system.
Why bother, is it really worth all the trouble?
If you running Linux as a single user system, or in an
environment where all the users are trusted, then there
is no real advantage for using PAM.
Ed: there is actually an advantage since you can
In a networked environment, it is clear that you need to think a
little more about how users etc., are authenticated:]
If you are running Linux as a server, where several different
services are being provided (e.g., WWW with areas restricted by
password control, PPP), then there can be some real and interesting
value for PAM. In particular, through the use of modules, PAM can
enable a program to search through several different password
databases, even if that program is not explicitly coded for
that particular database. Here are some examples of the possibilities
that this enables.
o Apache has a module that provides PAM services. Now
authentication
to use particular directories can be conducted by PAM, which
means that the range of modules that are available to PAM can
be used, including RADIUS, NIS, NCP (which means that Novell
password databases can be used).
o pppd has a PAMified version (available from RedHat) Now it is
possible to use a series of databases to authenticate ppp users.
In addition to the normal Linux-based password databases (such
as /etc/passwd and /etc/shadow), you can use PAM modules to
authenticate against Novell password databases or NT-based
password databases.
o The preceding two examples can be combined. Imagaine that the
persons in your office/department are already registered with a
username and password in a Novell or NT LAN. If you wanted to
use this database on your Linux server (for PPP access, for
web access, or even for normal shell access), you can use PAM
to authenticate against this existing database, rather than
maintain a separate database on both Linux and the LAN server.
Can I use PAM for any program that requires authentication?
Yes and no. Yes, if you have access to the source code, and can
add the appropriate PAM functions. No, if you do not have access
to the source code, and the binary does not have the PAM functions
included.
In other words, if a program is going to use PAM, then it has to
have PAM functions explicitly coded into the program. If they
are not, then it is not possible to use PAM.
How can I tell whether a program has PAM coded into it or not?
A quick-and-dirty (but not always reliable) method is to ldd
If libpam and libpam_misc are not among the libraries that the program
uses, then it is not going to work with PAM. However, it is possible
that the libraries are included, but there are still problems, because
the PAM coding in the program does not work as it should. So a
more reliable method is to make the follow tests.
In the /etc/pam.d directory, one needs to make a configuration file
for the program that one wants to run. The exact name of the
configuration
file is hard-coded into the program. Usually, it is the same name as
the
program, but not always. For sake of illustration, let's assume that
the program is named "pamprog" and the name of the configuration file
is /etc/pam.d/pamprog.
In the /etc/pam.d/pamprog but the following two lines:
auth required pam_permit.so
auth required pam_warn.so
Now try to use pamprog. The first line in the configuration file
says that all users are permitted. The second line will write a
warning to your syslog file (or whether you syslog is writing
messages). If this test succeeds, then you know that you have
a program that can understand pam, and you can start the more
interesting work of deciding how to stack modules in your
/etc/pam.d/pamprog file.
d366 3
a368 7
the user's application for service. In general,
Just to get a feel for the power of this new syntax, here is a taste
of what you can do with it. With /etc/pam.d/ and
/etc/pam.conf in sequence. In this mode, entries in
/etc/pam.d/ override those of /etc/pam.conf.
a562 14
In general the leakage of some information about user accounts is not
a secure policy for modules to adopt. Sometimes information such as
users names or home directories, or preferred shell, can be used to
attack a user's account. In some circumstances, however, this sort of
information is not deemed a threat: displaying a user's full name when
asking them for a password in a secured environment could also be
called being 'friendly'. The
Here is a sample "other" configuration file. The
#
# The PAM configuration file for the `other' service
#
auth required pam_deny.so
auth required pam_warn.so
account required pam_deny.so
account required pam_warn.so
password required pam_deny.so
password required pam_warn.so
session required pam_deny.so
session required pam_warn.so
d850 2
a851 2
url="http://www.kernel.org/pub/linux/libs/pam/pre/doc/rfc86.0.txt.gz"
name="http://www.kernel.org/pub/linux/libs/pam/pre/doc/rfc86.0.txt.gz">
d878 1
a878 1
This document was written by Andrew G. Morgan (morgan@@kernel.org)
d880 29
a908 1
d924 3
d933 1
a933 1
Copyright (c) Andrew G. Morgan 1996-9. All rights reserved.
d935 1
a935 1
Email: <morgan@@linux.kernel.org>
d983 1
a983 1
$Id: pam_source.sgml,v 1.5 2001/03/19 01:46:41 agmorgan Exp $
@
1.1.1.1.6.2
log
@Back out the extremely unwise PAM MFC that I did about 4 days ago.
My apologies to all. Please pass the pointy hat.
@
text
@d5 1
a5 2
$Id: pam_source.sgml,v 1.5 1997/04/05 06:49:14 morgan Exp morgan $
$FreeBSD$
d7 1
a7 1
Copyright (c) Andrew G. Morgan 1996,1997. All rights reserved.
d48 2
a49 2
Andrew G. Morgan, morgan@@linux.kernel.orgDRAFT v0.59 1998/1/7
d143 1
a143 1
Traditinally, the former step is achieved by the Note, at time of writing, this newer syntax is so new that I don't
want to write too much about it. Please play with this. Report all
the bugs and make suggestions for new actions (etc.).
d580 1
a580 1
Any line in (one of) the confiuration file(s), that is not formatted
d602 4
a605 4
used. The other mode (and the one currently supported by Red Hat 4.2)
is to use both /etc/pam.d/ and /etc/pam.conf in
sequence. In this mode, entries in /etc/pam.d/ override
those of /etc/pam.conf.
d709 14
a843 11
The standard UNIX modules, used above, are strongly tied to using the
default `
d1049 1
a1049 1
This document was written by Andrew G. Morgan (morgan@@parc.power.net)
d1051 1
a1051 29
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.
a1066 3
Currently there is no documentation for PAM-aware applications.
d1073 1
a1073 1
Copyright (c) Andrew G. Morgan 1996. All rights reserved.
d1075 1
a1075 1
Email: <morgan@@parc.power.net>
d1123 1
a1123 1
$Id: pam_source.sgml,v 1.5 1997/04/05 06:49:14 morgan Exp morgan $
@
1.1.1.1.6.3
log
@Switch importer
@
text
@d6 1
a6 1
$FreeBSD: stable/4/contrib/libpam/doc/pam_source.sgml 78074 2001-06-11 15:28:52Z markm $
@
1.1.1.2
log
@Vendor import Linux PAM 0.75
@
text
@d5 1
a5 1
$Id: pam_source.sgml,v 1.5 2001/03/19 01:46:41 agmorgan Exp $
d7 1
a7 1
Copyright (c) Andrew G. Morgan 1996-2001. All rights reserved.
d48 2
a49 2
Andrew G. Morgan, morgan@@kernel.orgDRAFT v0.75 2001/03/18
d143 1
a143 1
Traditionally, the former step is achieved by the Getting started
The following text was contributed by Seth Chaiklin:
To this point, we have described how PAM should work in an
ideal world, in which all applications are coded properly.
However, at the present time (October 1998), this is far
from the case. Therefore, here are some practical considerations
in trying to use PAM in your system.
Why bother, is it really worth all the trouble?
If you running Linux as a single user system, or in an
environment where all the users are trusted, then there
is no real advantage for using PAM.
Ed: there is actually an advantage since you can
In a networked environment, it is clear that you need to think a
little more about how users etc., are authenticated:]
If you are running Linux as a server, where several different
services are being provided (e.g., WWW with areas restricted by
password control, PPP), then there can be some real and interesting
value for PAM. In particular, through the use of modules, PAM can
enable a program to search through several different password
databases, even if that program is not explicitly coded for
that particular database. Here are some examples of the possibilities
that this enables.
o Apache has a module that provides PAM services. Now
authentication
to use particular directories can be conducted by PAM, which
means that the range of modules that are available to PAM can
be used, including RADIUS, NIS, NCP (which means that Novell
password databases can be used).
o pppd has a PAMified version (available from RedHat) Now it is
possible to use a series of databases to authenticate ppp users.
In addition to the normal Linux-based password databases (such
as /etc/passwd and /etc/shadow), you can use PAM modules to
authenticate against Novell password databases or NT-based
password databases.
o The preceding two examples can be combined. Imagaine that the
persons in your office/department are already registered with a
username and password in a Novell or NT LAN. If you wanted to
use this database on your Linux server (for PPP access, for
web access, or even for normal shell access), you can use PAM
to authenticate against this existing database, rather than
maintain a separate database on both Linux and the LAN server.
Can I use PAM for any program that requires authentication?
Yes and no. Yes, if you have access to the source code, and can
add the appropriate PAM functions. No, if you do not have access
to the source code, and the binary does not have the PAM functions
included.
In other words, if a program is going to use PAM, then it has to
have PAM functions explicitly coded into the program. If they
are not, then it is not possible to use PAM.
How can I tell whether a program has PAM coded into it or not?
A quick-and-dirty (but not always reliable) method is to ldd
If libpam and libpam_misc are not among the libraries that the program
uses, then it is not going to work with PAM. However, it is possible
that the libraries are included, but there are still problems, because
the PAM coding in the program does not work as it should. So a
more reliable method is to make the follow tests.
In the /etc/pam.d directory, one needs to make a configuration file
for the program that one wants to run. The exact name of the
configuration
file is hard-coded into the program. Usually, it is the same name as
the
program, but not always. For sake of illustration, let's assume that
the program is named "pamprog" and the name of the configuration file
is /etc/pam.d/pamprog.
In the /etc/pam.d/pamprog but the following two lines:
auth required pam_permit.so
auth required pam_warn.so
Now try to use pamprog. The first line in the configuration file
says that all users are permitted. The second line will write a
warning to your syslog file (or whether you syslog is writing
messages). If this test succeeds, then you know that you have
a program that can understand pam, and you can start the more
interesting work of deciding how to stack modules in your
/etc/pam.d/pamprog file.
d366 3
a368 7
the user's application for service. In general,
Just to get a feel for the power of this new syntax, here is a taste
of what you can do with it. With /etc/pam.d/ and
/etc/pam.conf in sequence. In this mode, entries in
/etc/pam.d/ override those of /etc/pam.conf.
a562 14
In general the leakage of some information about user accounts is not
a secure policy for modules to adopt. Sometimes information such as
users names or home directories, or preferred shell, can be used to
attack a user's account. In some circumstances, however, this sort of
information is not deemed a threat: displaying a user's full name when
asking them for a password in a secured environment could also be
called being 'friendly'. The
Here is a sample "other" configuration file. The
#
# The PAM configuration file for the `other' service
#
auth required pam_deny.so
auth required pam_warn.so
account required pam_deny.so
account required pam_warn.so
password required pam_deny.so
password required pam_warn.so
session required pam_deny.so
session required pam_warn.so
d850 2
a851 2
url="http://www.kernel.org/pub/linux/libs/pam/pre/doc/rfc86.0.txt.gz"
name="http://www.kernel.org/pub/linux/libs/pam/pre/doc/rfc86.0.txt.gz">
d878 1
a878 1
This document was written by Andrew G. Morgan (morgan@@kernel.org)
d880 29
a908 1
d924 3
d933 1
a933 1
Copyright (c) Andrew G. Morgan 1996-9. All rights reserved.
d935 1
a935 1
Email: <morgan@@linux.kernel.org>
d983 1
a983 1
$Id: pam_source.sgml,v 1.5 2001/03/19 01:46:41 agmorgan Exp $
@