JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Managing SMB File Sharing and Windows Interoperability in Oracle Solaris 11.1     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Sharing Files Between Windows and Oracle Solaris Systems

2.  Setting Up Identity Mapping Between Windows and Oracle Solaris Systems

Mapping User and Group Identities

Creating Your Identity Mapping Strategy

Mapping Well-Known Windows Account Names

Managing Directory-Based Name Mapping for Users and Groups (Task Map)

How to Extend the Active Directory Schema, and User and Group Entries

How to Extend the Native LDAP Schema, and User and Group Entries

How to Configure Directory-Based Mapping

How to Add a Directory-Based Name Mapping to a User Object

How to Add a Directory-Based Name Mapping to a Group Object

How to Remove a Directory-Based Name Mapping From a User Object

How to Remove a Directory-Based Name Mapping From a Group Object

Managing Directory-Based Identity Mapping by Using Identity Management for UNIX (Task Map)

How to Enable Identity Management for UNIX Support

Managing Rule-Based Identity Mapping for Users and Groups (Task Map)

How to Add a User Mapping Rule

How to Add a Group Mapping Rule

How to Import User Mappings From a Rule-Mapping File

How to Show Mappings

How to Show a Mapping for a Particular Identity

How to Show All Established Mappings

How to Remove a User Mapping Rule

How to Remove a Group Mapping Rule

Troubleshooting the Identity Mapping Service

Viewing Identity Mapping Service Property Settings

Saving and Restoring Name-Based Mapping Rules

Viewing Details About Mappings

Debugging the Identity Mapping Service

3.  Setting Up a Oracle Solaris SMB Server to Manage and Share Files

4.  Using SMB File Sharing on Client Systems

A.  SMB DTrace Provider

Glossary

Index

Managing Rule-Based Identity Mapping for Users and Groups (Task Map)

Windows systems and Oracle Solaris systems use different identity schemes to determine who is permitted to access systems and system objects. When the Oracle Solaris SMB server is integrated into an existing Windows domain, the Oracle Solaris user IDs and group IDs must find equivalent Windows SIDs to use for authorization and file access. The SMB server uses identity mapping software to perform these tasks.

By default, no rule-based mappings are configured. In this case, non-ephemeral Oracle Solaris UIDs and GIDs are mapped to local SIDs. Local SIDs are composed of the server's SID and an RID that is derived algorithmically from the UID or GID. Similarly, domain user and group SIDs are mapped to ephemerally, dynamically allocated UIDs and GIDs. A system administrator can also create a set of rule-based mappings to map users and groups by name. Such rule-based mapping requires that Windows uses Active Directory and that the specified users and groups must already exist.

The following table points to the tasks that you can use to manage rule-based identity mapping for the SMB server in a Windows environment. These tasks use the idmap(1M) command to manage identity mapping.

Task
Description
For Instructions
Add a user mapping rule.
Use idmap rules to create identity equivalents for Windows users and Oracle Solaris users based on the names in the naming services.
Add a group mapping rule.
Use idmap rules to create identity equivalents for Windows groups and Oracle Solaris groups based on the names in the naming services.
Import rule-based user mappings from the usermap.cfg file.
Use this procedure to add one or more user mappings from a usermap.cfg file that specifies rule-based mappings.
List all of the mappings.
Use this procedure to review all mappings or to find particular mappings for users and groups.
Show the mapping for a particular identity.
Use this procedure to view how a particular name or ID is mapped.
Show all the established mappings.
Use this procedure to view the mappings stored in the cache.
Remove a user mapping rule.
Use this procedure to remove a rule-based mapping when a user is no longer part of the naming service in your Windows domain.
Remove a group mapping rule.
Use this procedure to remove a rule-based mapping when a group is no longer part of the naming service in your Windows domain.

For more information about user and group identities, see Mapping User and Group Identities. For more information about how to determine your identity mapping strategy, see Creating Your Identity Mapping Strategy.


Note - In a cluster configuration, changes made to user maps and to group maps on one server are immediately propagated to the other server.


How to Add a User Mapping Rule

The idmap command enables you to create rule-based mappings between Windows users and Oracle Solaris users. By default, the SMB server uses ephemeral identity mapping. Shell special characters, such as the double quote character ("), the asterisk character (*), and the backslash character (\), must be quoted when used as user names and domain names.

  1. Become an administrator, obtain the solaris.admin.idmap.rules RBAC authorization, or use the Idmap Service Management RBAC profile.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Determine the user names that you want to map.
    1. Determine the domain and name of the Windows user that you want to map to an Oracle Solaris user.

      The Windows user name must be specified by using one of the following formats:

      • winuser:username@domain-name

      • winuser:'domain-name\username'

    2. Determine the name of the Oracle Solaris user that you want to map to the Windows user.

      The Oracle Solaris user name must be specified by using the format unixuser:username.

    If username is the empty string (""), mapping is inhibited. Only directional mappings can have an empty string as their target identity. No mapping is created by the identity mapping service, and the nobody ID is used for access control. Do not use a user name of "" to preclude logins by unmapped Windows users.

    If username uses the wildcard (*), it matches all user names that are not matched by other mappings. Similarly, if username is the wildcard Windows name (*@*), it matches all user names in all domains that are not matched by other mappings.

  3. Create the user mapping.

    By default, identity mappings are bidirectional, which means that the Windows name is mapped to the Oracle Solaris name and the Oracle Solaris name is mapped to the Windows name. If you want the mapping to be unidirectional, specify the -d option.

    If username uses the wildcard on both sides of the mapping, the user name is the same for both Windows and Oracle Solaris users. For example, the '*@example.com' == '*' rule ensures that the jp@example.com Windows user name maps to the jp Oracle Solaris user name.


    Caution

    Caution - Be careful when creating rule-based mappings that use wildcards for the user names. Windows user names are case insensitive, while Oracle Solaris user names are case sensitive. Note that the case of Windows names that appear in idmap name rules and in idmap show commands is irrelevant.

    Oracle Solaris environments typically use lowercase characters for user names, but uppercase characters are permitted. Therefore, using a wildcard to map Windows names to Oracle Solaris user names might not produce the expected results. Rule-based mapping rules that use the unixuser:* target map to the Oracle Solaris user name as follows:

    • Map the canonical Windows name, which uses the found in the directory entry, to the matching Oracle Solaris user name.

    • If no such Oracle Solaris user name exists, fold the case of the canonical Windows name to lower case and use it as the SMB user name.

    As a result of this differing treatment of case, user names that appear to be alike might not be recognized as matches. You must create rules to handle such pairings of strings that differ only in case. For example, to map Oracle Solaris user Kerry to Windows user kerry@example.com, you must create the following rule:

    # idmap add winuser:'*@example.com' unixuser:'*'
    # idmap add winuser:kerry@example.com unixuser:Kerry

    • Create a bidirectional mapping between a Windows user name and an Oracle Solaris user name.
      # idmap add winuser:username@domain-name unixuser:username
    • Create a unidirectional mapping between a Windows user name and an Oracle Solaris user name.
      # idmap add -d winuser:username@domain-name unixuser:username
    • Create a unidirectional mapping between an Oracle Solaris user name and a Windows user name.
      # idmap add -d unixuser:username winuser:username@domain-name

How to Add a Group Mapping Rule

The idmap command enables you to create rule-based mappings between Windows groups and Oracle Solaris groups. By default, the SMB server uses ephemeral identity mapping.

You can also create diagonal mappings to maps between a Windows group and an Oracle Solaris user and between an Oracle Solaris group and a Windows user. These mappings are needed when Windows uses a group identity as a file owner or a user identity as a file group. Shell special characters, such as the double quote character ("), the asterisk character (*), and the backslash character (\), must be quoted when used as group names and domain names.

  1. Become an administrator, obtain the solaris.admin.idmap.rules RBAC authorization, or use the Idmap Service Management RBAC profile.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Determine the group names that you want to map.
    1. Determine the domain and name of the Windows group that you want to map to an Oracle Solaris group.

      The Windows group name must be specified by using one of the following formats:

      • wingroup:group-name@domain-name

      • wingroup:'domain-name\group-name'

    2. Determine the name of the Oracle Solaris user or group that you want to map to the Windows group.

      The Oracle Solaris group name must be specified by using the format unixgroup:group-name. The Oracle Solaris user name must be specified by using the format unixuser:username.

    If group-name is the empty string (""), mapping is inhibited.

    If group-name uses the wildcard (*), it matches all group names that are not matched by other mappings. Similarly, if group-name is the wildcard Windows name (*@*), it matches all group names in all domains that are not matched by other mappings.

  3. Create the group mapping.

    By default, identity mappings are bidirectional, which means that the Windows group name is mapped to the Oracle Solaris group name, and the Oracle Solaris group name is mapped to the Windows group name. If you want the mapping to be unidirectional, specify the -d option.

    If group-name uses the wildcard on both sides of the mapping, the group name is the same for both Windows groups and Oracle Solaris groups. For example, if the rule is "*@example.com" == "*", the staff@example.com Windows group name would match this rule and map to the staff Oracle Solaris group name.


    Caution

    Caution - Be careful when creating rule-based mappings that use wildcards for the group names. Windows group names are case insensitive, while Oracle Solaris group names are case sensitive. Note that the case of Windows names that appear in idmap name rules and in idmap show commands is irrelevant.

    Oracle Solaris environments typically use lowercase characters for group names, but uppercase characters are permitted. Therefore, using a wildcard to map Windows names to Oracle Solaris group names might not produce the expected results. Rule-based mapping rules that use the unixgroup:* target map to the Oracle Solaris group name as follows:

    • Map the canonical Windows name, which uses the found in the directory entry, to the matching Oracle Solaris group name.

    • If no such Oracle Solaris group name exists, fold the case of the canonical Windows name to lower case and use it as the SMB group name.

    As a result of this differing treatment of case, group names that appear to be alike might not be recognized as matches. You must create rules to handle such pairings of strings that differ only in case. For example, to map Oracle Solaris group Sales to Windows group sales@example.com, you must create the following rule:

    # idmap add wingroup:'*@example.com' unixgroup:'*'
    # idmap add wingroup:sales@example.com unixgroup:Sales

    • Create a bidirectional mapping between a Windows group name and an Oracle Solaris group name.
      # idmap add wingroup:group-name@domain-name unixgroup:group-name
    • Create a unidirectional mapping between a Windows group name and an Oracle Solaris group name.
      # idmap add -d wingroup:group-name@domain-name unixgroup:group-name
    • Create a unidirectional mapping between an Oracle Solaris group name and a Windows group name.
      # idmap add -d unixgroup:group-name wingroup:group-name@domain-name
    • Create a diagonal mapping between a Windows group name and an Oracle Solaris user name.
      # idmap add -d wingroup:group-name@domain-name unixuser:username
    • Create a diagonal mapping between an Oracle Solaris group name and a Windows user name.
      # idmap add -d unixgroup:group-name winuser:username@domain-name

How to Import User Mappings From a Rule-Mapping File

The idmap import command enables you to import a set of rule-based user mappings that are stored in a file.

The idmap supports these file formats:

  1. Become an administrator, obtain the solaris.admin.idmap.rules RBAC authorization, or use the Idmap Service Management RBAC profile.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Import the user mappings from standard input or from a file.
    # idmap import [-F] [-f file] format

    For example, suppose that you have a file called myusermaps that uses the usermap.cfg format to specify the following user name mappings:

    # cat myusermaps
    dana@example.com == dana
    danab@example.com => dana

    Use one of the following commands to add these mappings to the database:

    • # cat myusermaps | idmap import usermap.cfg

    • # idmap import -f myusermaps usermap.cfg

How to Show Mappings

The idmap list command enables you to view all of the rule-based identity mappings that you created for users and groups. You can also find particular mappings for users and groups.

How to Show a Mapping for a Particular Identity

The idmap show command enables you to view the particular name or ID for a name or ID that you specify.

How to Show All Established Mappings

The idmap dump command enables you to view all of the SID-to-UID and SID-to-GID mappings that are stored in the cache.

How to Remove a User Mapping Rule

The idmap command enables you to remove a rule-based mapping that you created.

  1. Become an administrator, obtain the solaris.admin.idmap.rules RBAC authorization, or use the Idmap Service Management RBAC profile.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Find the user mapping that you want to remove.
    # idmap list

    For example, to find all user mappings that map to the Oracle Solaris user pat, type:

    # idmap list | grep pat
  3. Remove one or more user mappings.
    • Remove any rule-based mapping that involves the specified user name, username.
      # idmap remove username
    • Remove rule-based mappings between username1 and username2.
      # idmap remove username1 username2
    • Remove all rule-based mappings.
      # idmap remove -a

How to Remove a Group Mapping Rule

The idmap command enables you to remove a rule-based mapping that you created.

  1. Become an administrator, obtain the solaris.admin.idmap.rules RBAC authorization, or use the Idmap Service Management RBAC profile.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Find the group mapping that you want to remove.
    # idmap list

    For example, to find all unidirectional group mappings that map to the Oracle Solaris group staff, type:

    # idmap list | grep staff
  3. Remove one or more group mappings.
    • Remove any rule-based mapping that involves the specified group name, group-name.
      # idmap remove group-name
    • Remove rule-based mappings between group-name1 and group-name2.
      # idmap remove group-name1 group-name2
    • Remove all rule-based mappings.
      # idmap remove -a