Manual Pages for UNIX Darwin command on man pam
MyWebUniversity

Manual Pages for UNIX Darwin command on man pam

PAM(8) Linux-PAM Manual PAM(8)

NAME

Linux-PAM - Pluggable Authentication Modules for Linux

SYNOPSIS

//eettcc//ppaamm..ccoonnff

DESCRIPTION

This manual is intended to offer a quick introduction to LLiinnuuxx-PPAAMM.

For more information the reader is directed to the LLiinnuuxx-PPAAMM ssyysstteemm

aaddmmiinniissttrraattoorrss'' gguuiiddee.

LLiinnuuxx-PPAAMM Is a system of libraries that handle the authentication tasks

of applications (services) on the system. The library provides a sta-

ble general interface (Application Programming Interface - API) that

privilege granting programs (such as llooggiinn(1) and ssuu(1)) defer to to perform standard authentication tasks. The principal feature of the PAM approach is that the nature of the authentication is dynamically configurable. In other words, the system

administrator is free to choose how individual service-providing appli-

cations will authenticate users. This dynamic configuration is set by

the contents of the single LLiinnuuxx-PPAAMM configuration file //eettcc//ppaamm..ccoonnff.

Alternatively, the configuration can be set by individual configuration files located in the //eettcc//ppaamm..dd// directory. The presence of this

directory will cause LLiinnuuxx-PPAAMM to ignore //eettcc//ppaamm..ccoonnff.

From the point of view of the system administrator, for whom this man-

ual is provided, it is not of primary importance to understand the

internal behavior of the LLiinnuuxx-PPAAMM library. The important point to

recognize is that the configuration file(s) define the connection

between applications (sseerrvviicceess) and the pluggable authentication mod-

ules (PPAAMMs) that perform the actual authentication tasks.

LLiinnuuxx-PPAAMM separates the tasks of authentication into four independent

management groups: aaccccoouunntt management; aauutthhentication management; ppaassss-

wwoorrdd management; and sseessssiioonn management. (We highlight the abbrevia-

tions used for these groups in the configuration file.) Simply put, these groups take care of different aspects of a typical user's request for a restricted service:

aaccccoouunntt - provide account verification types of service: has the user's

password expired?; is this user permitted access to the requested ser-

vice?

aauutthhentication - establish the user is who they claim to be. Typically

this is via some challenge-response request that the user must satisfy:

if you are who you claim to be please enter your password. Not all

authentications are of this type, there exist hardware based authenti-

cation schemes (such as the use of smart-cards and biometric devices),

with suitable modules, these may be substituted seamlessly for more

standard approaches to authentication - such is the flexibility of

LLiinnuuxx-PPAAMM.

ppaasssswwoorrdd - this group's responsibility is the task of updating authen-

tication mechanisms. Typically, such services are strongly coupled to those of the aauutthh group. Some authentication mechanisms lend themselves

well to being updated with such a function. Standard UN*X password-

based access is the obvious example: please enter a replacement pass-

word.

sseessssiioonn - this group of tasks cover things that should be done prior to

a service being given and after it is withdrawn. Such tasks include the

maintenance of audit trails and the mounting of the user's home direc-

tory. The sseessssiioonn management group is important as it provides both an opening and closing hook for modules to affect the services available to a user. The configuration file(s)

When a LLiinnuuxx-PPAAMM aware privilege granting application is started, it

activates its attachment to the PAM-API. This activation performs a

number of tasks, the most important being the reading of the configura-

tion file(s): //eettcc//ppaamm..ccoonnff. Alternatively, this may be the contents of the //eettcc//ppaamm..dd// directory. These files list the PPAAMMs that will do the authentication tasks

required by this service, and the appropriate behavior of the PAM-API

in the event that individual PPAAMMs fail. The syntax of the //eettcc//ppaamm..ccoonnff configuration file is as follows. The file is made up of a list of rules, each rule is typically placed on a single line, but may be extended with an escaped end of line: `\'.

Comments are preceded with `#' marks and extend to the next end of

line. The format of each rule is a space separated collection of tokens, the

first three being case-insensitive:

sseerrvviiccee ttyyppee ccoonnttrrooll mmoodduullee-ppaatthh mmoodduullee-aarrgguummeennttss

The syntax of files contained in the //eettcc//ppaamm..dd// directory, are identi-

cal except for the absence of any service field. In this case, the ser-

vice is the name of the file in the //eettcc//ppaamm..dd// directory. This file-

name must be in lower case.

An important feature of LLiinnuuxx-PPAAMM, is that a number of rules may be

stacked to combine the services of a number of PAMs for a given authen-

tication task.

The sseerrvviiccee is typically the familiar name of the corresponding appli-

cation: llooggiinn and ssuu are good examples. The sseerrvviiccee-name, ootthheerr, is

reserved for giving default rules. Only lines that mention the current

service (or in the absence of such, the ootthheerr entries) will be associ-

ated with the given service-application.

The ttyyppee is the management group that the rule corresponds to. It is used to specify which of the management groups the subsequent module is to be associated with. Valid entries are: aaccccoouunntt; aauutthh; ppaasssswwoorrdd; and sseessssiioonn. The meaning of each of these tokens was explained above.

The third field, ccoonnttrrooll, indicates the behavior of the PAM-API should

the module fail to succeed in its authentication task. There are two types of syntax for this control field: the simple one has a single

simple keyword; the more complicated one involves a square-bracketed

selection of vvaalluuee==aaccttiioonn pairs. For the simple (historical) syntax valid ccoonnttrrooll values are: rreeqquuiissiittee

- failure of such a PAM results in the immediate termination of the

authentication process; rreeqquuiirreedd - failure of such a PAM will ulti-

mately lead to the PAM-API returning failure but only after the remain-

ing stacked modules (for this sseerrvviiccee and ttyyppee) have been invoked; ssuuff-

ffiicciieenntt - success of such a module is enough to satisfy the authentica-

tion requirements of the stack of modules (if a prior rreeqquuiirreedd module

has failed the success of this one is ignored); ooppttiioonnaall - the success

or failure of this module is only important if it is the only module in the stack associated with this sseerrvviiccee+ttyyppee. For the more complicated syntax valid ccoonnttrrooll values have the following form: [value1=action1vvaalluuee22==aaccttiioonn22...] Where vvaalluueeNN corresponds to the return code from the function invoked in the module for which the line is defined. It is selected from one of these: ssuucccceessss; ooppeenneerrrr; ssyymmbboolleerrrr; sseerrvviicceeeerrrr; ssyysstteemmeerrrr; bbuuffeerrrr; ppeerrmmddeenniieedd; aauutthheerrrr; ccrreeddiinnssuuffffiicciieenntt; aauutthhiinnffoouunnaavvaaiill; uusseerruunnkknnoowwnn; mmaaxxttrriieess; nneewwaauutthhttookkrreeqqdd; aacccctteexxppiirreedd; sseessssiioonneerrrr;

ccrreedduunnaavvaaiill; ccrreeddeexxppiirreedd; ccrreeddeerrrr; nnoommoodduulleeddaattaa; ccoonnvveerrrr; aauutthh-

ttookkeerrrr; aauutthhttookkrreeccoovveerreerrrr; aauutthhttookklloocckkbbuussyy; aauutthhttookkddiissaabblleeaaggiinngg; ttrryyaaggaaiinn; iiggnnoorree; aabboorrtt; aauutthhttookkeexxppiirreedd; mmoodduulleeuunnkknnoowwnn; bbaaddiitteemm; and ddeeffaauulltt. The last of these, ddeeffaauulltt, implies 'all vvaalluueeNN's not mentioned explicitly. Note, the full list of PAM errors is available in

/usr/include/security/pamtypes.h . The aaccttiioonnNN can be: an unsigned

integer, JJ, signifying an action of 'jump over the next J modules in the stack'; or take one of the following forms:

iiggnnoorree - when used with a stack of modules, the module's return status

will not contribute to the return code the application obtains;

bbaadd - this action indicates that the return code should be thought of

as indicative of the module failing. If this module is the first in the stack to fail, its status value will be used for that of the whole stack.

ddiiee - equivalent to bad with the side effect of terminating the module

stack and PAM immediately returning to the application.

ookk - this tells PAM that the administrator thinks this return code

should contribute directly to the return code of the full stack of mod-

ules. In other words, if the former state of the stack would lead to a return of PPAAMMSSUUCCCCEESSSS, the module's return code will override this value. Note, if the former state of the stack holds some value that is indicative of a modules failure, this 'ok' value will not be used to override that value.

ddoonnee - equivalent to ok with the side effect of terminating the module

stack and PAM immediately returning to the application.

rreesseett - clear all memory of the state of the module stack and start

again with the next stacked module.

mmoodduullee-ppaatthh - this is either the full filename of the PAM to be used by

the application (it begins with a '/'), or a relative pathname from the default module location: //lliibb//sseeccuurriittyy//.

mmoodduullee-aarrgguummeennttss - these are a space separated list of tokens that can

be used to modify the specific behavior of the given PAM. Such argu-

ments will be documented for each individual module. FILES

//eettcc//ppaamm..ccoonnff - the configuration file

//eettcc//ppaamm..dd// - the LLiinnuuxx-PPAAMM configuration directory. Generally, if this

directory is present, the //eettcc//ppaamm..ccoonnff file is ignored.

//lliibb//lliibbppaamm..ssoo..XX - the dynamic library

//lliibb//sseeccuurriittyy//**..ssoo - the PAMs

EERRRROORRSS

Typically errors generated by the LLiinnuuxx-PPAAMM system of libraries, will

be written to ssyysslloogg(3). CCOONNFFOORRMMIINNGG TTOO

DCE-RFC 86.0, October 1995.

Contains additional features, but remains backwardly compatible with this RFC.

BUGS

None known.

SEE ALSO

The three LLiinnuuxx-PPAAMM Guides, for ssyysstteemm aaddmmiinniissttrraattoorrss, mmoodduullee ddeevveelloopp-

eerrss, and aapppplliiccaattiioonn ddeevveellooppeerrss.

Linux-PAM 0.74 2001 Jan 20 PAM(8)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™