System Administration Guide: Security Services

PAM (Tasks)

This section discusses some tasks that might be required to make the PAM framework fully functional. In particular, you should be aware of some security issues that are associated with the PAM configuration file.

PAM (Task Map)

Task 

Description 

For Instructions 

Plan for your PAM Installation 

 Consider configuration issues and make decisions about them before you start the software configuration process.Planning for PAM

Add new PAM modules 

 Sometimes, site-specific modules must be written and installed to cover requirements that are not part of the generic software. This procedure covers the installation process.How to Add a PAM Module

Block access through ~/.rhosts

Steps to further increase security by preventing access through ~/.rhosts.How to Prevent Unauthorized Access From Remote Systems With PAM

Initiate error reporting 

Steps to start the reporting of PAM error messages through syslog.How to Initiate PAM Error Reporting

Planning for PAM

When you are deciding how best to use PAM in your environment, start by focusing on these issues:

Here are some suggestions to consider before you change the PAM configuration file:

How to Add a PAM Module

  1. Become superuser or assume an equivalent role.

  2. Determine which control flags and which other options should be used.

    Refer to PAM Modules information on the modules.

  3. Copy the new module to /usr/lib/security/sparcv9.

    In the Solaris 8 release, the module should be copied to /usr/lib/security.

  4. Set the permissions so that the module file is owned by root and that permissions are 555.

  5. Edit the PAM configuration file, /etc/pam.conf, and add this module to the appropriate services.

Verification

You must test before the system is rebooted in case the configuration file is misconfigured. Run rlogin, su, and telnet before you reboot the system. The service might be a daemon that is spawned only once when the system is booted. Then you must reboot the system before you can verify that the module has been added.

How to Prevent Unauthorized Access From Remote Systems With PAM

Remove the rlogin auth rhosts_auth.so.1 entry from the PAM configuration file. This step prevents the reading of the ~/.rhosts files during an rlogin session. Therefore, this step prevents unauthenticated access to the local system from remote systems. All rlogin access requires a password, regardless of the presence or contents of any ~/.rhosts or /etc/hosts.equiv files.


Note –

To prevent other unauthenticated access to the ~/.rhosts files, remember to disable the rsh service. The best way to disable a service is to remove the service entry from the /etc/inetd.conf file. Changing the PAM configuration file does not prevent the service from being started.


How to Initiate PAM Error Reporting

  1. Edit the /etc/syslog.conf file to add any of the following entries for PAM error reporting:

    • auth.alert – Messages about conditions that should be fixed immediately

    • auth.crit – Critical messages

    • auth.err – Error messages

    • auth.info – Informational messages

    • auth.debug – Debugging messages

  2. Restart the syslog daemon, or send a SIGHUP signal to the daemon to activate the PAM error reporting.

Example—Initiating PAM Error Reporting

In the following example, all alert messages are displayed on the console. Critical messages are mailed to root. Informational and debug messages are added to the /var/log/pamlog file.


auth.alert	/dev/console
auth.crit	'root'
auth.info;auth.debug	/var/log/pamlog

Each line in the log contains a time stamp, the name of the system that generated the message, and the message. The pamlog file is capable of logging a large amount of information.