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)

Limiting r-Services


The old r-services (rsh, rcp, and rlogin) are considered harmful and should never be used, due to security weaknesses. On the other hand, you cannot just neglect them since legacy applications rely on them. For example, you find legacy engineering applications which use rsh for parallel execution.

You can use PAM to restrict the usage of r-services. First of all, restriction on the r-services can be imposed, but another powerful restriction is to limit the availability of the services to a small group of users.

The basic module for working with the r-services is called pam_rhosts. This module is at least supported by Linux, FreeBSD, and Solaris. It provides the authentication methods found in the original r-services, for example, the use of host.equiv and rhosts files. The /etc/host.equiv file lists which hosts are equivalent to localhost, while a .rhosts file in the user's home directory can allow the user to log in without giving a password.

The pam_rhosts module can disable...