JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 11.1 Administration: Security Services     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Part I Security Overview

1.  Security Services (Overview)

Part II System, File, and Device Security

2.  Managing Machine Security (Overview)

3.  Controlling Access to Systems (Tasks)

4.  Virus Scanning Service (Tasks)

5.  Controlling Access to Devices (Tasks)

6.  Verifying File Integrity by Using BART (Tasks)

7.  Controlling Access to Files (Tasks)

Part III Roles, Rights Profiles, and Privileges

8.  Using Roles and Privileges (Overview)

9.  Using Role-Based Access Control (Tasks)

10.  Security Attributes in Oracle Solaris (Reference)

Part IV Cryptographic Services

11.  Cryptographic Framework (Overview)

12.  Cryptographic Framework (Tasks)

13.  Key Management Framework

Part V Authentication Services and Secure Communication

14.  Using Pluggable Authentication Modules

PAM (Overview)

Benefits of Using PAM

Introduction to the PAM Framework

Changes to PAM for This Release

PAM (Tasks)

PAM (Task Map)

Planning for Your PAM Implementation

How to Add a PAM Module

How to Prevent Rhost-Style Access From Remote Systems With PAM

How to Log PAM Error Reports

How to Assign a Customized PAM Policy to a User

How to Assign a New Rights Policy to All Users

PAM Configuration (Reference)

PAM Configuration Search Order

PAM Configuration File Syntax

Per User Authentication Policy

How PAM Stacking Works

PAM Stacking Example

15.  Using Secure Shell

16.  Secure Shell (Reference)

17.  Using Simple Authentication and Security Layer

18.  Network Services Authentication (Tasks)

Part VI Kerberos Service

19.  Introduction to the Kerberos Service

20.  Planning for the Kerberos Service

21.  Configuring the Kerberos Service (Tasks)

22.  Kerberos Error Messages and Troubleshooting

23.  Administering Kerberos Principals and Policies (Tasks)

24.  Using Kerberos Applications (Tasks)

25.  The Kerberos Service (Reference)

Part VII Auditing in Oracle Solaris

26.  Auditing (Overview)

27.  Planning for Auditing

28.  Managing Auditing (Tasks)

29.  Auditing (Reference)

Glossary

Index

PAM (Tasks)

This section discusses some tasks that might be required to make the PAM framework use a particular security policy. You should be aware of some security issues that are associated with the PAM configuration files. For information about the security issues, see Planning for Your PAM Implementation.

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.
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 explains how to install these new PAM modules.
Assign a new PAM policy to a user.
Establish specific authentication requirements for multiple services to be assigned to a specific user.
Assign a new rights profile to all users.
Establish specific authentication requirements for multiple services to be assigned to all users on the system.
Block access through ~/.rhosts.
Further increase security by preventing access through ~/.rhosts.
Initiate error logging.
Start the logging of PAM error messages through syslog.

Planning for Your PAM Implementation

As delivered, the PAM configuration implements the standard security policy. This policy should work in many situations. If you need to implement a different security policy, here are the issues that you should focus on:

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

How to Add a PAM Module

This procedure shows how to add a new PAM module. New modules can be created to cover site-specific security policies or to support third party applications.

Before You Begin

You must assume the root role. For more information, see How to Use Your Assigned Administrative Rights.

  1. Determine which control flags and which options should be used.

    Refer to How PAM Stacking Works for information on the control flags.

  2. Ensure that the ownership and permissions are set so that the module file is owned by root and the permissions are 555.
  3. Use pfedit to edit an appropriate PAM configuration file and add this module to the appropriate services.

    Changes can be made to either /etc/pam.conf or /etc/pam.d/service.

  4. Verify that the module has been added properly.

    You must test in case the configuration file is misconfigured. Login using a direct service, such as ssh, and run the su command.

How to Prevent Rhost-Style Access From Remote Systems With PAM


Note - The rsh service is not enabled by default. To provide a more secure connection, use the ssh command instead.


Before You Begin

You must assume the root role. For more information, see How to Use Your Assigned Administrative Rights.

  1. Remove all of the lines that include rhosts_auth.so.1 from the PAM configuration files.

    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.

  2. Disable the rsh service.

    To prevent unauthenticated access to the system, remember to disable the rsh service.

    # svcadm disable network/shell:default
  3. Disable the rlogin service.

    Disable the rlogin service as well, if necessary.

    # svcadm disable network/login:rlogin

How to Log PAM Error Reports

Before You Begin

You must assume the root role. For more information, see How to Use Your Assigned Administrative Rights.

  1. Determine which system-log service instance is online.
    # svcs system-log
    STATE          STIME    FMRI
    disabled       13:11:55 svc:/system/system-log:rsyslog
    online         13:13:27 svc:/system/system-log:default

    Note - If the rsyslog service instance is online, modify the rsyslog.conf file.


  2. Configure the /etc/syslog.conf file for the level of logging that you need.

    See the syslog.conf(4) man page for more information about the logging levels. Most PAM error reporting is done to the LOG_AUTH facility.

  3. Refresh the configuration information for the system-log service.
    # svcadm refresh system-log:default

    Note - Refresh the system-log:rsyslog service instance if the rsyslog service is online.


How to Assign a Customized PAM Policy to a User

Before You Begin

You must assume the root role. For more information, see How to Use Your Assigned Administrative Rights.

  1. Create a new PAM policy configuration file.

    See the comments in the text below for a description of the effects of the file.

    # cat /etc/opt/pam_policy/custom-config
    #
    # PAM configuration which uses UNIX authentication for console logins,
    # LDAP for SSH keyboard-interactive logins, and denies telnet logins.
    #
    login auth requisite          pam_authtok_get.so.1
    login auth required           pam_dhkeys.so.1
    login auth required           pam_unix_auth.so.1
    login auth required           pam_unix_cred.so.1
    login auth required           pam_dial_auth.so.1
    #
    sshd-kbdint  auth requisite          pam_authtok_get.so.1
    sshd-kbdint  auth binding            pam_unix_auth.so.1 server_policy
    sshd-kbdint  auth required           pam_unix_cred.so.1
    sshd-kbdint  auth required           pam_ldap.so.1
    #
    telnet    auth     requisite    pam_deny.so.1
    telnet    account  requisite    pam_deny.so.1
    telnet    session  requisite    pam_deny.so.1
    telnet    password requisite    pam_deny.so.1
  2. Check the file permissions on the new file.

    The file must be owned by root and can not be group or world writable.

    # ls -l /etc/opt/pam_policy
    total 5
    -r--r--r--   1 root         4570 Jun 21 12:08 custom-config
  3. Assign the new PAM policy to a user.

    The custom-config file in /etc/opt/pam_policy is assigned to the user named jill.

    # useradd -K pam_policy=/etc/opt/pam_policy/custom-config jill

How to Assign a New Rights Policy to All Users

Before You Begin

You must assume the root role. For more information, see How to Use Your Assigned Administrative Rights.

  1. Create a new rights policy.

    In this example, the ldap PAM policy is used.

    # profiles -p "PAM Per-User Policy of LDAP" \
          'set desc="Profile which sets pam_policy=ldap";
           set pam_policy=ldap; exit;'
  2. Assign the new rights profile to all users.

    Use pfedit to add the new policy to the PROFS_GRANTED declaration.

    # cat /etc/security/policy.conf
      .
      .
    
    AUTHS_GRANTED=
    PROFS_GRANTED=Basic Solaris User,PAM Per-User Policy of LDAP
    CONSOLE_USER=Console User

Example 14-1 Assigning a Rights Profile to a User

If a profile has been created as in step 1 in the previous procedure, that rights profile can be assigned to a user using the following command:

# usermod -P +"PAM Per-User Policy of LDAP" jill