JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Administration: Security Services     Oracle Solaris 11 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)

Controlling System Access (Task Map)

Securing Logins and Passwords (Tasks)

Securing Logins and Passwords (Task Map)

How to Change the root Password

How to Display a User's Login Status

How to Display Users Without Passwords

How to Temporarily Disable User Logins

How to Monitor Failed Login Attempts

How to Monitor All Failed Login Attempts

Changing the Default Algorithm for Password Encryption (Tasks)

How to Specify an Algorithm for Password Encryption

How to Specify a New Password Algorithm for an NIS Domain

How to Specify a New Password Algorithm for an LDAP Domain

Monitoring and Restricting Superuser (Tasks)

How to Monitor Who Is Using the su Command

How to Restrict and Monitor Superuser Logins

Controlling Access to System Hardware (Tasks)

How to Require a Password for Hardware Access

How to Disable a System's Abort Sequence

4.  Virus Scanning Service (Tasks)

5.  Controlling Access to Devices (Tasks)

6.  Using the Basic Audit Reporting Tool (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.  Network Services Authentication (Tasks)

15.  Using PAM

16.  Using SASL

17.  Using Secure Shell (Tasks)

18.  Secure Shell (Reference)

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

Securing Logins and Passwords (Tasks)

You can limit remote logins, require users to have passwords, and require the root account to have a complex password. You can also monitor failed access attempts and disable logins temporarily.

Securing Logins and Passwords (Task Map)

The following task map points to procedures that monitor user logins and that disable user logins.

Task
Description
For Instructions
Change the root password.
Ensures that the root account complies with password requirements.
Display a user's login status.
Lists extensive information about a user's login account, such as full name and password aging information.
Find users who do not have passwords.
Finds only those users whose accounts do not require a password.
Disable logins temporarily.
Denies user logins to a machine as part of system shutdown or routine maintenance.
Save failed login attempts.
Creates a log of users who failed to provide the correct password after five attempts.
Save all failed login attempts.
Creates a log of failed attempts to log in.

How to Change the root Password

When you change the root password, you must comply with the password requirements that apply to all users of the system.

Before You Begin

You must be in the root role.

How to Display a User's Login Status

Before You Begin

You must be in the root role.

Example 3-1 Displaying a User's Login Status

In the following example, the login status for the user jdoe is displayed.

# logins -x -l jdoe
jdoe       500     staff           10   Jaylee Jaye Doe
                   /home/jdoe
                   /bin/bash
                   PS 010103 10 7 -1
jdoe

Identifies the user's login name.

500

Identifies the user ID (UID).

staff

Identifies the user's primary group.

10

Identifies the group ID (GID).

Jaylee Jaye Doe

Identifies the comment.

/home/jdoe

Identifies the user's home directory.

/bin/bash

Identifies the login shell.

PS 010170 10 7 -1

Specifies the password aging information:

  • Last date that the password was changed

  • Number of days that are required between changes

  • Number of days before a change is required

  • Warning period

How to Display Users Without Passwords

Before You Begin

You must be in the root role.

Example 3-2 Displaying Users Without Passwords

In the following example, the user pmorph does not have a password.

# logins -p
pmorph          501     other           1       Polly Morph
# 

How to Temporarily Disable User Logins

Temporarily disable user logins during system shutdown or routine maintenance. Superuser logins are not affected. For more information, see the nologin(4) man page.

Before You Begin

You must be in the root role.

  1. Create the /etc/nologin file in a text editor.
    # vi /etc/nologin
  2. Include a message about system availability.
  3. Close and save the file.

Example 3-3 Disabling User Logins

In this example, users are notified of system unavailability.

# vi /etc/nologin
(Add system message here)
 
# cat /etc/nologin 
***No logins permitted.***

***The system will be unavailable until 12 noon.***

You can also bring the system to run level 0, single-user mode, to disable logins. For information about bringing the system to single-user mode, see Chapter 3, Shutting Down a System (Tasks), in Booting and Shutting Down Oracle Solaris on x86 Platforms.

How to Monitor Failed Login Attempts

This procedure captures failed login attempts from terminal windows. This procedure does not capture failed logins from a desktop login attempt.

Before You Begin

You must be in the root role.

  1. Create the loginlog file in the /var/adm directory.
    # touch /var/adm/loginlog
  2. Set read-write permissions for root user on the loginlog file.
    # chmod 600 /var/adm/loginlog
  3. Change group membership to sys on the loginlog file.
    # chgrp sys /var/adm/loginlog
  4. Verify that the log works.

    For example, log in to the system five times with the wrong password. Then, display the /var/adm/loginlog file.

    # more /var/adm/loginlog
    jdoe:/dev/pts/2:Tue Nov  4 10:21:10 2010
    jdoe:/dev/pts/2:Tue Nov  4 10:21:21 2010
    jdoe:/dev/pts/2:Tue Nov  4 10:21:30 2010
    jdoe:/dev/pts/2:Tue Nov  4 10:21:40 2010
    jdoe:/dev/pts/2:Tue Nov  4 10:21:49 2010
    #

    The loginlog file contains one entry for each failed attempt. Each entry contains the user's login name, tty device, and time of the failed attempt. If a person makes fewer than five unsuccessful attempts, no failed attempts are logged.

    A growing loginlog file can indicate an attempt to break into the computer system. Therefore, check and clear the contents of this file regularly. For more information, see the loginlog(4) man page.

How to Monitor All Failed Login Attempts

This procedure captures in a syslog file all failed login attempts.

Before You Begin

You must be in the root role.

  1. Set up the /etc/default/login file with the desired values for SYSLOG and SYSLOG_FAILED_LOGINS

    Edit the /etc/default/login file to change the entry. Make sure that SYSLOG=YES is uncommented.

    # grep SYSLOG /etc/default/login
    # SYSLOG determines whether the syslog(3) LOG_AUTH facility should be used
    SYSLOG=YES
    # The SYSLOG_FAILED_LOGINS variable is used to determine how many failed
    #SYSLOG_FAILED_LOGINS=5
    SYSLOG_FAILED_LOGINS=0
    #
  2. Create a file with the correct permissions to hold the logging information.
    1. Create the authlog file in the /var/adm directory.
      # touch /var/adm/authlog
    2. Set read-and-write permissions for root user on the authlog file.
      # chmod 600 /var/adm/authlog
    3. Change group membership to sys on the authlog file.
      # chgrp sys /var/adm/authlog
  3. Edit the syslog.conf file to log failed password attempts.

    Send the failures to the authlog file.

    1. Type the following entry into the syslog.conf file.

      Fields on the same line in syslog.conf are separated by tabs.

      auth.notice <Press Tab>  /var/adm/authlog
    2. Refresh the system-log service.
      # svcadm refresh system/system-log
  4. Verify that the log works.

    For example, as an regular user, log in to the system with the wrong password. Then, as superuser, display the /var/adm/authlog file.

    # more /var/adm/authlog
    Nov  4 14:46:11 example1 login: [ID 143248 auth.notice] 
     Login failure on /dev/pts/8 from example2, stacey
    #
  5. Monitor the /var/adm/authlog file on a regular basis.

Example 3-4 Logging Access Attempts After Three Login Failures

Follow the preceding procedure, except set the value of SYSLOG_FAILED_LOGINS to 3 in the /etc/default/login file.

Example 3-5 Closing Connection After Three Login Failures

Uncomment the RETRIES entry in the /etc/default/login file, then set the value of RETRIES to 3. Your edits take effect immediately. After three login retries in one session, the system closes the connection.