Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (10116 KB)
idmap(1M)Name | Synopsis | Description | Operands | Options | Examples | Exit Status | Attributes | See Also | Notes Name
Synopsisidmap idmap -f command-file idmap add [-d] name1 name2 idmap dump [-n] [-v] idmap export [-f file] format idmap get-namemap name idmap help idmap import [-F] [-f file] format idmap list idmap remove [-t|-f] name idmap remove -a idmap remove [-d] name1 name2
idmap set-namemap [-a authenticationMethod] [-D bindDN]
[-j passwdfile] name1 name2
idmap show [-c] [-v] identity [target-type]
idmap unset-namemap [-a authenticationMethod] [-D bindDN]
[-j passwdfile] name [target-type]
Description
The idmap utility is used to configure and manage the Native Identity Mapping service. The Native Identity Mapping service supports the following types of mappings between Windows security identities (SIDs) and POSIX user IDs and group IDs (UIDs and GIDs): The idmap utility can be used to create and manage the name-based mappings and to monitor the mappings in effect. If the idmap utility is invoked without a subcommand or option, it reads the subcommands from standard input. When standard input is a TTY, the idmap command prints the usage message and exits. Mapping MechanismsThe idmapd(1M) daemon maps Windows user and group SIDs to UNIX UIDs and GIDs as follows: Local SID mappings are used to map from UNIX to Windows. To prevent aliasing problems, all file systems, archive and backup formats, and protocols must store SIDs or map all UIDs and GIDs in the 231 to 232 - 2 range to the nobody user and group. It is possible to create also diagonal mappings. They are the mappings between Windows groups and Solaris users and between Solaris groups and Windows users. They are needed when Windows uses a group identity as a file owner or vice versa. Name-based MappingsName-based mappings establish name equivalence between Windows users and groups and their counterparts in the UNIX name service. These mappings persist across reboots. For example, the following command maps Windows users to UNIX users with the same name:
If configured to use a directory service, idmapd(1M) will first try to use name mapping information that is stored in user or group objects in the Active Directory (AD) and/or the native LDAP directory service. For example, an AD object for a given Windows user or group can be augmented to include the corresponding Solaris user or group name. Similarly, the native LDAP object for a given Solaris user or group can be augmented to include the corresponding Windows user or group name. idmapd(1M) can be configured to use AD and/or native LDAP directory-based name mappings by setting the appropriate service management facility (SMF) properties of the idmap service. See “Service Properties,” below, for more details. If directory-based name mapping is not configured or if configured but not found, then idmapd(1M) will process locally stored name-based mapping rules. idmap supports the mapping of Windows well-known names. A few of these are listed below:
When idmap rules are added, these well-known names will be expanded to canonical form. That is, either the default domain name will be added (for names that are not well-known) or an appropriate built-in domain name will be added. Depending on the particular well-known name, this domain name might be null, BUILTIN, or the local host name. The following sequence of idmap commands illustrate the treatment of the non-well-known name fred and the well-known names administrator and guest.
Ephemeral MappingsThe idmapd daemon attempts to preserve ephemeral ID mappings across daemon restarts. However, when IDs cannot be preserved, the daemon maps each previously mapped SID to a new ephemeral UID or GID value. The daemon will never re-use ephemeral UIDs or GIDs. If the idmapd daemon runs out of ephemeral UIDs and GIDs, it returns an error as well as a default UID or GID for SIDs that cannot be mapped by name. The dynamic ID mappings are not retained across reboots. So, any SIDs that are dynamically mapped to UNIX UIDs or GIDs are most likely mapped to different IDs after rebooting the system. Local SID MappingsIf no name-based mapping is found, a non-ephemeral UID or GID is mapped to an algorithmically generated local SID. The mapping is generated as follows:
<machine SID> is a unique SID generated by the idmap service for the host on which it runs. Rule Lookup OrderWhen mapping a Windows name to a UNIX name, lookup for name-based mapping rules is performed in the following order: When mapping a UNIX name to a Windows name, lookup for name-based mapping rules is performed in the following order: Service PropertiesThe service properties determine the behavior of the idmapd(1M) daemon. These properties are stored in the SMF repository (see smf(5)) under property group config. They can be accessed and modified using svccfg(1M), which requires solaris.smf.value.idmap authorization. The service properties for the idmap service are: Changes to service properties do not affect a running idmap service. The service must be refreshed (with svcadm(1M)) for the changes to take effect. Operands
The idmap command uses the following operands: Options
The idmap command supports one option and a set of subcommands. The subcommands also have options. Command-Line OptionSubcommandsThe following subcommands are supported: Examples
Example 1 Using a Wildcard on Both Sides of a Name-Based Mapping RuleThe following command maps all Windows user names in the xyz.com domain to the UNIX users with the same names provided that one exists and is not otherwise mapped. If such a rule is matched but the UNIX user name does not exist, an ephemeral ID mapping is used.
Example 2 Using a Wildcard on One Side of a Name-Based Mapping RuleThe following command maps all unmapped Windows users in the xyz.com domain to the guest UNIX user. The -d option specifies a unidirectional mapping from *@xyz.com users to the guest user.
Example 3 Adding a Bidirectional Name-Based Mapping RuleThe following command maps Windows user, foobar@example.com, to UNIX user, foo, and conversely:
This command shows how to remove the mapping added by the previous command:
Example 4 Showing a UID-to-SID MappingExample 5 Listing the Cached SID-to-UID MappingsThe following command shows all of the SID-to-UID mappings that are in the cache:
Example 6 Batching idmap RequestsThe following commands show how to batch idmap requests. This particular command sequence does the following:
Example 7 Listing Name-Based Mapping RulesThe following command shows how to list the name-based mapping rules:
Example 8 Importing Name-Based Mapping Rules From the usermap.cfg FileThe usermap.cfg file can be used to configure name-based mapping rules. The following usermap.cfg file shows mapping rules that map Windows user foo@example.com to UNIX user foo, and that map foobar@example.com to the UNIX user foo.
The following idmap command imports usermap.cfg information to the idmapd database:
This command does the same as the previous command:
The following commands are equivalent to the previous idmap import commands:
Example 9 Using Name-Based and Ephemeral ID Mapping With Identity Function Mapping and ExceptionsThe following commands map all users in the example.com Windows domain to UNIX user accounts of the same name. The command also specifies mappings for the following Windows users: joe@example.com, jane.doe@example.com, administrator@example.com. The administrator from all domains is mapped to nobody. Any Windows users without corresponding UNIX accounts are mapped dynamically to available ephemeral UIDs.
Example 10 Adding Directory-based Name Mapping to AD User ObjectThe following command maps Windows user joe@example.com to UNIX user joe by adding the UNIX name to AD object for joe@example.com.
Example 11 Adding Directory-based Name Mapping to Native LDAP User ObjectThe following command maps UNIX user foo to Windows user foobar@example.com by adding the Windows name to native LDAP object for foo.
Example 12 Removing Directory-based Name Mapping from AD User ObjectThe following command removes the UNIX username unixuser from the AD object representing joe@example.com.
Exit StatusAttributesSee attributes(5) for descriptions of the following attributes:
See AlsoNotesThe idmapd service is managed by the service management facility, smf(5). The service identifier for the idmapd service is svc:/system/idmap. Use the svcadm command to perform administrative actions on this service, such as enabling, disabling, or restarting the service. These actions require the solaris.smf.manage.idmap authorization. Use the svcs command to query the service's status. Windows user names are case-insensitive, while UNIX user names are case-sensitive. The case of Windows names as they appear in idmap name-rules and idmap show command lines is irrelevant. Because common practice in UNIX environments is to use all-lowercase user names, wildcard name-rules map Windows names to UNIX user/group names as follows: first, the canonical Windows name (that is, in the case as it appears in the directory) is used as a UNIX user or group name. If there is no such UNIX entity, then the Windows name's case is folded to lowercase and the result is used as the UNIX user or group 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 the Windows user sam@example to the Solaris user Sam, you must create the following rules:
For guidance on modifying an Active Directory schema, consult the Microsoft document, Step-by-Step Guide to Using Active Directory Schema and Display Specifiers, which you can find at their technet web site, http://technet.microsoft.com/. Name | Synopsis | Description | Operands | Options | Examples | Exit Status | Attributes | See Also | Notes |
||||||||||||||||||||||||||||||||