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)

Apache htaccess Made Smart


The Apache web server supports the use of a htaccess file in order to restrict access to some areas of websites. User names and passwords are maintained by the htpasswd utility, which is part of the main Apache distribution.

The architecture of Apache is very modular, and there is a module that can use PAM for authentication purposes instead of standard htaccess files. The major disadvantage is that the module is currently not maintained but most current Linux distributions and FreeBSD do include the module.

The module provides the usual htaccess authentication, but in addition it is possible to require membership of a particular group (the /etc/group in traditionally UNIX authentication). The Debian/Ubuntu developers have split the PAM authentication module in two packages. Installation is straightforward:

  # sudo apt-get install libapache2-mod-auth-pam
  # sudo apt-get install libapache2-mod-sys-group

The latter command installs the module for checking group membership...