Book Image

Pluggable Authentication Modules: The Definitive Guide to PAM for Linux SysAdmins and C Developers

By : Kenneth Geisshirt
Book Image

Pluggable Authentication Modules: The Definitive Guide to PAM for Linux SysAdmins and C Developers

By: Kenneth Geisshirt

Overview of this book

<p>PAM-aware applications reduce the complexity of authentication. With PAM you can use the same user database for every login process. PAM also supports different authentication processes as required. Moreover, PAM is a well-defined API, and PAM-aware applications will not break if you change the underlying authentication configuration.<br /><br />The PAM framework is widely used by most Linux distributions for authentication purposes. Originating from Solaris 2.6 ten years ago, PAM is used today by most proprietary and free UNIX operating systems including GNU/Linux, FreeBSD, and Solaris, following both the design concept and the practical details. PAM is thus a unifying technology for authentication mechanisms in UNIX. <br /><br />PAM is a modular and flexible authentication management layer that sits between Linux applications and the native underlying authentication system. PAM can be implemented with various applications without having to recompile the applications to specifically support PAM.</p>
Table of Contents (13 chapters)

Getting Backstage


In the phase of testing and debugging, it is often useful to get some information about which modules are called, and what they are doing. Most modules support the debug parameter. If the module is configured by a configuration file and not only by parameters in the PAM configuration files, it is highly possible that you can increase the amount of logging in the configuration file.

Enabling Logging

Most modules support the debug parameter for enabling print out of debug messages. These messages are written to log files using syslog. An example of two PAM modules with enabled debugging is shown next.

auth    required        pam_unix.so nullok_secure debug
auth    optional        pam_mount.so use_first_pass debug

The debug parameter will enable basic logging, that is you will be able to see when a user tried to log in and which PAM modules were used in order to authenticate him or her.

Many modules can extend the logging. If it is possible, it is typically enabled in a module...