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)

Using RBAC (Tasks)

Viewing and Using RBAC Defaults (Tasks)

Viewing and Using RBAC Defaults (Task Map)

How to View All Defined Security Attributes

How to View Your Assigned Rights

How to Assume a Role

How to Change the Security Attributes of a User

How to Use Your Assigned Administrative Rights

Customizing RBAC for Your Site (Tasks)

Initially Configuring RBAC (Task Map)

How to Plan Your RBAC Implementation

How to Create a Role

How to Assign a Role

How to Audit Roles

How to Create a Rights Profile

How to Clone and Modify a System Rights Profile

How to Create an Authorization

How to Add RBAC Properties to Legacy Applications

How to Troubleshoot RBAC and Privilege Assignment

Managing RBAC (Tasks)

Managing RBAC (Task Map)

How to Change the Password of a Role

How to Change the Security Attributes of a Role

How to Reorder Assigned Security Attributes

How to Restrict an Administrator to Explicitly Assigned Rights

How to Enable a User to Use Own Password to Assume a Role

How to Change the root Role Into a User

Using Privileges (Tasks)

How to List the Privileges on the System

How to Determine the Privileges That You Have Been Directly Assigned

How to Determine the Privileged Commands That You Can Run

How to Determine the Privileges on a Process

How to Determine Which Privileges a Program Requires

How to Apply Extended Privilege Policy to a Port

How to Run a Shell Script With Privileged Commands

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

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

Managing RBAC (Tasks)

After you have configured and are using RBAC, use the following procedures to maintain and modify RBAC on your systems.

Managing RBAC (Task Map)

The following task map points to procedures for maintaining role-based access control (RBAC) after RBAC has been initially implemented.

Task
Description
For Instructions
Change the role password.
The root role changes the password of the role.
Modify the assigned rights of a role.
Modifies the security attributes of a role.
Modify a rights profile.
Modifies security attribute values in a rights profile, such as limit privileges and default privileges.
Reorder rights profile assignment.
Ensures that assigned security attributes are available to a user or role.
Create a restricted profile shell.
Prevents users or roles from full access to all commands in the software.
Restrict a user's privileges.
Limits the user's basic or limit set of privileges.
Remove default rights from a system.
Creates a system for special uses.
Enable a user to supply the user's password to assume a role.
Modifies a user's security attributes to make the user's password authenticate the user to a role. This behavior is similar to Linux role behavior.
Change the root role into a user.
Prior to decommissioning a system, change the root role into a user.
Restrict user actions on the desktop.
While these actions do not require RBAC, they add security to your system.

These procedures manage security attributes on users, roles, and rights profiles. For basic user management procedures, refer to Chapter 1, Managing User Accounts and User Environments (Overview), in Managing User Accounts and User Environments in Oracle Solaris 11.1.

How to Change the Password of a Role

Because a role can be assigned to many users, users who are assigned a role cannot change the role password.

Before You Begin

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

Example 9-24 Changing a Role's Password

In this example, the root role changes the password of the local devmgt role.

# passwd -r files  devmgt
New password: Type new password
Confirm password: Retype new password

In this example, the root role changes the password of the devmgt role in the LDAP directory service.

# passwd -r ldap devmgt
New password: Type new password
Confirm password: Retype new password

In this example, the root role changes the password of the devmgt role in file and LDAP.

# passwd devmgt
New password: Type new password
Confirm password: Retype new password

How to Change the Security Attributes of a Role

Before You Begin

You must become an administrator who is assigned the User Security rights profile to change most of the security attributes of a role. To assign audit flags or change a role's password, you must assume the root role. For more information, see How to Use Your Assigned Administrative Rights.

  1. Use the rolemod command.

    This command modifies the attributes of a role that is defined in the local naming service or in LDAP. The values of the -A, -P, and -R options can be modified by - or +. The - sign indicates to subtract the value from the currently assigned values. The+ sign indicates to add the value to the currently assigned values.

    For more information about the rolemod command, see the following:

    • For a short description, see the description of the roleadd command in How to Create a Role.

    • For all arguments to this command, see the rolemod(1M) man page.

    • For the list of key values for the -K option, see the user_attr(4) man page.

    The following command adds two rights profiles to the devmgt role in the LDAP repository:

    $ rolemod  -P +"Device Management,File Management" -S ldap devadmin
  2. To change a role's password, see How to Change the Password of a Role.

Example 9-25 Changing a Local Role's Security Attributes

In this example, the security administrator modifies the prtmgt role to include the VSCAN Management rights profile.

$ rolemod -c "Handles printers and virus scanning" \
-P "Printer Management,VSCAN Management,All" prtmgt

Example 9-26 Assigning Privileges Directly to a Role

In this example, the security administrator entrusts the systime role with a very specific privilege that affects system time.

$ rolemod -K defaultpriv='proc_clock_highres' systime

The values for the defaultpriv keyword are in the list of privileges in the role's processes at all times.

How to Reorder Assigned Security Attributes

Oracle Solaris reads rights profiles in order of assignment, as described in Order of Search for Assigned Security Attributes. In this procedure, you reorder rights profiles.

Before You Begin

You must become an administrator who is assigned the User Security rights profile. For more information, see How to Use Your Assigned Administrative Rights.

  1. View the list of rights profiles that are currently assigned to the user or role.

    The list displays in order.

    $ profiles username|rolename
  2. Assign the rights profiles in the correct order.
    $ usermod | rolemod -P "list-of-profiles"

Example 9-27 Assigning Rights Profiles in a Specific Order

In this example, the administrator determines that a rights profile with privileged commands is listed after the All rights profile for the role devadmin.

$ profiles devadmin
    Basic Solaris User
    All
    Device Management

Therefore, the devadmin role cannot run the device management commands with their assigned privileges.

The administrator reassigns the rights profiles to devadmin. In the new order of assignment, devadmin can run the device management commands with their assigned privileges.

$ rolemod -P "Device Management,Basic Solaris User,All"
$ profiles devadmin
    Device Management
    Basic Solaris User
    All

How to Restrict an Administrator to Explicitly Assigned Rights

You can restrict a role or user to a limited number of administrative actions in two ways.

Before You Begin

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

Example 9-28 Modifying a System to Limit the Rights Available to Its Users

In this example, the administrator creates a system that is useful only to administer the network. The administrator removes the Basic Solaris User rights profile and any authorizations from the policy.conf file. The Console User rights profile is not removed. The affected lines in the resulting policy.conf file are the following:

...
#AUTHS_GRANTED=
#PROFS_GRANTED=Basic Solaris User
CONSOLE_USER=Console User
...

Only a user who has been explicitly assigned authorizations, commands, or rights profiles is able to use this system. After login, the authorized user can perform administrative duties. If the authorized user is sitting at the system console, the user has the rights of the Console User.

How to Enable a User to Use Own Password to Assume a Role

By default, users must type the role's password to assume a role. Perform this procedure to make assuming a role in Oracle Solaris similar to assuming a role in a Linux environment.

Before You Begin

You assume a role that includes the User Security rights profile. This role cannot be the role whose roleauth value you want to change.

Example 9-29 Enabling a Role to Use the Assigned User's Password When Using a Rights Profile

In this example, the root role changes the value of roleauth for the role secadmin on the local system.

$ profiles -p "Local System Administrator"
profiles:Local System Administrator> set roleauth="user"
profiles:Local System Administrator> end
profiles:Local System Administrator> exit

When a user who is assigned the Security Administrator rights profile wants to assume the role, the user is prompted for a password. In the following sequence, the role name is secadmin:

% su - secadmin
Password: Type user password
$ /** You are now in a profile shell with administrative rights**/

If the user has been assigned other roles, they use their own password to authenticate to those roles, too.

Example 9-30 Changing the Value of roleauth for a Role in the LDAP Repository

In this example, the root role enables all users who can assume the role secadmin to use their own password when assuming a role. This capability is granted to these users for all systems that are managed by the LDAP server.

# rolemod -S ldap -K roleauth=user secadmin

Troubleshooting

If roleauth=user is set for the role, the user password enables the authenticated role to access all rights that are assigned to that role. This keyword is search-dependent. For more information, see Order of Search for Assigned Security Attributes.

How to Change the root Role Into a User

An administrator might change root to a user when decommissioning a system that has been removed from the network. In this instance, logging in to the system as root simplifies the cleanup.

Before You Begin

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

  1. Remove the root role assignment from local users.

    For example, remove the role assignment from two users.

    % su - root
    Password: a!2@3#4$5%6^7
    # roles jdoe
    root
    # roles kdoe
    root
    # roles ldoe
    secadmin
    # usermod -R "" jdoe
    # usermod -R "" kdoe
    #
  2. Change the root role into a user.
    # rolemod -K type=normal root

    Users who are currently in the root role remain so, Other users who have root access can su to root or log in to the system as the root user.

  3. Verify the change.

    You can use one of the following commands.

    # getent user_attr root
    root::::auths=solaris.*;profiles=All;audit_flags=lo\:no;lock_after_retries=no;
    min_label=admin_low;clearance=admin_high

    If the type keyword is missing in the output or is equal to normal, the account is not a role.

    # userattr type root

    If the output is empty or lists normal, the account is not a role.

Example 9-31 Preventing the root Role From Being Used to Configure a System

In this example, site security policy requires that the root account be prevented from maintaining the system. The administrator has created and tested the roles which maintain the system. These roles include every security profile and the System Administrator rights profile. A trusted user has been assigned a role that can restore a backup. No role can change the audit flags for the system, a user, or a rights profile.

To prevent the root account from being used to maintain the system, the security administrator removes the root role assignment. Because the root account must be able to log in to the system in single-user mode, the account retains a password.

# usermod -K roles= jdoe
# userattr roles jdoe

Example 9-32 Changing the root User Into the root Role

In this example, the root user turns the root user back into a role.

First, the root user changes the root account into a role and verifies the change.

# usermod -K type=role root
# getent user_attr root
root::::type=role;auths=solaris.*;profiles=All;audit_flags=lo\:no;
lock_after_retries=no;min_label=admin_low;clearance=admin_high

Then, root assigns the root role to a local user.

# usermod -R root jdoe

Troubleshooting

In a desktop environment, you cannot directly log in as root when root is a role. A diagnostic message indicates that root is a role on your system.

If you do not have a local account that can assume the root role, create one. As root, log in to the system in single-user mode, create a local user account and password, and assign the root role to the new account. Then, log in as the new user and assume the root role.