3557 dumpvp_size is not updated correctly when a dump zvol's size is changed
[unleashed.git] / usr / src / man / man1m / idmap.1m
blob7854c02708c032ae9d242210a3ddae3cc871eab9
1 '\" te
2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
5 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH IDMAP 1M "Aug 3, 2009"
7 .SH NAME
8 idmap \- configure and manage the Native Identity Mapping service
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBidmap\fR
13 .fi
15 .LP
16 .nf
17 \fBidmap\fR \fB-f\fR \fIcommand-file\fR
18 .fi
20 .LP
21 .nf
22 \fBidmap\fR add [\fB-d\fR] \fIname1\fR \fIname2\fR
23 .fi
25 .LP
26 .nf
27 \fBidmap\fR dump [\fB-n\fR] [\fB-v\fR]
28 .fi
30 .LP
31 .nf
32 \fBidmap\fR export [\fB-f\fR \fIfile\fR] \fIformat\fR
33 .fi
35 .LP
36 .nf
37 \fBidmap\fR get-namemap \fIname\fR
38 .fi
40 .LP
41 .nf
42 \fBidmap\fR help
43 .fi
45 .LP
46 .nf
47 \fBidmap\fR import [\fB-F\fR] [\fB-f\fR \fIfile\fR] \fIformat\fR
48 .fi
50 .LP
51 .nf
52 \fBidmap\fR list
53 .fi
55 .LP
56 .nf
57 \fBidmap\fR remove [\fB-t\fR|\fB-f\fR] \fIname\fR
58 .fi
60 .LP
61 .nf
62 \fBidmap\fR remove \fB-a\fR
63 .fi
65 .LP
66 .nf
67 \fBidmap\fR remove [\fB-d\fR] \fIname1\fR \fIname2\fR
68 .fi
70 .LP
71 .nf
72 \fBidmap\fR set-namemap [\fB-a\fR \fIauthenticationMethod\fR] [\fB-D\fR \fIbindDN\fR]
73      [\fB-j\fR \fIpasswdfile\fR] \fIname1\fR \fIname2\fR
74 .fi
76 .LP
77 .nf
78 \fBidmap\fR show [\fB-c\fR] [\fB-v\fR] \fIidentity\fR [\fItarget-type\fR]
79 .fi
81 .LP
82 .nf
83 \fBidmap\fR unset-namemap [\fB-a\fR \fIauthenticationMethod\fR] [\fB-D\fR \fIbindDN\fR]
84      [\fB-j\fR \fIpasswdfile\fR] \fIname\fR [\fItarget-type\fR]
85 .fi
87 .SH DESCRIPTION
88 .sp
89 .LP
90 The \fBidmap\fR utility is used to configure and manage the Native Identity
91 Mapping service.
92 .sp
93 .LP
94 The Native Identity Mapping service supports the following types of mappings
95 between Windows security identities (SIDs) and POSIX user IDs and group IDs
96 (UIDs and GIDs):
97 .RS +4
98 .TP
99 .ie t \(bu
100 .el o
101 \fBName-based mapping.\fR An administrator maps Windows and UNIX users and
102 groups by name.
104 .RS +4
106 .ie t \(bu
107 .el o
108 \fBEphemeral ID mapping.\fR A UID or GID is dynamically allocated for every SID
109 that is not already mapped by name.
111 .RS +4
113 .ie t \(bu
114 .el o
115 \fBLocal-SID mapping.\fR A non-ephemeral UID or GID is mapped to an
116 algorithmically generated local SID.
120 The \fBidmap\fR utility can be used to create and manage the name-based
121 mappings and to monitor the mappings in effect.
124 If the \fBidmap\fR utility is invoked without a subcommand or option, it reads
125 the subcommands from standard input. When standard input is a TTY, the
126 \fBidmap\fR command prints the usage message and exits.
127 .SS "Mapping Mechanisms"
130 The \fBidmapd\fR(1M) daemon maps Windows user and group SIDs to UNIX UIDs and
131 GIDs as follows:
132 .RS +4
135 SIDs are mapped by name.
137 This mapping uses the name-based mappings that are manually set up by the
138 system administrator.
140 .RS +4
143 If no name-based mapping is found, the SID is mapped to a dynamically
144 allocated ephemeral ID.
146 This allocation uses the next available UID or GID from 2^31 to 2^32 - 2.
150 Local SID mappings are used to map from UNIX to Windows.
153 To prevent aliasing problems, all file systems, archive and backup formats, and
154 protocols must store SIDs or map all UIDs and GIDs in the 2^31 to 2^32 - 2
155 range to the \fBnobody\fR user and group.
158 It is possible to create also diagonal mappings. They are the mappings between
159 Windows groups and Solaris users and between Solaris groups and Windows users.
160 They are needed when Windows uses a group identity as a file owner or vice
161 versa.
162 .SS "Name-based Mappings"
165 Name-based mappings establish name equivalence between Windows users and groups
166 and their counterparts in the UNIX name service. These mappings persist across
167 reboots. For example, the following command maps Windows users to UNIX users
168 with the same name:
170 .in +2
172 # \fBidmap add "winuser:*@mywindomain.com" "unixuser:*"\fR
174 .in -2
179 If configured to use a directory service, \fBidmapd\fR(1M) will first try to
180 use the mapping information that is stored in user or group objects in the
181 Active Directory (AD) and/or the native LDAP directory service. For example, an
182 AD object for a given Windows user or group can be augmented to include the
183 corresponding Solaris user or group name or numeric id. Similarly, the native
184 LDAP object for a given Solaris user or group can be augmented to include the
185 corresponding Windows user or group name.
188 \fBidmapd\fR(1M) can be configured to use AD and/or native LDAP directory-based
189 name mappings by setting the appropriate service management facility (SMF)
190 properties of the \fBidmap\fR service. See "Service Properties," below, for
191 more details.
194 If directory-based name mapping is not configured or if configured but not
195 found, then \fBidmapd\fR(1M) will process locally stored name-based mapping
196 rules.
199 \fBidmap\fR supports the mapping of Windows well-known names. A few of these
200 are listed below:
202 .in +2
204 Administrator
205 Guest
206 KRBTGT
207 Domain Admins
208 Domain Users
209 Domain Guest
210 Domain Computers
211 Domain Controllers
213 .in -2
218 When \fBidmap\fR rules are added, these well-known names will be expanded to
219 canonical form. That is, either the default domain name will be added (for
220 names that are not well-known) or an appropriate built-in domain name will be
221 added. Depending on the particular well-known name, this domain name might be
222 null, \fBBUILTIN\fR, or the local host name.
225 The following sequence of \fBidmap\fR commands illustrate the treatment of the
226 non-well-known name \fBfred\fR and the well-known names \fBadministrator\fR and
227 \fBguest\fR.
229 .in +2
231 # \fBidmap add winname:fred unixuser:fredf\fR
232 add     winname:fred    unixuser:fredf
234 # \fBidmap add winname:administrator unixuser:root\fR
235 add     winname:administrator   unixuser:root
237 # \fBidmap add winname:guest unixuser:nobody\fR
238 add     winname:guest   unixuser:nobody
240 # \fBidmap add wingroup:administrators sysadmin\fR
241 add     wingroup:administrators unixgroup:sysadmin
243 # \fBidmap list\fR
244 add     winname:Administrator@examplehost  unixuser:root
245 add     winname:Guest@examplehost  unixuser:nobody
246 add     wingroup:Administrators@BUILTIN unixgroup:sysadmin
247 add     winname:fred@example.com       unixuser:fredf
249 .in -2
252 .SS "Ephemeral Mappings"
255 The \fBidmapd\fR daemon attempts to preserve ephemeral ID mappings across
256 daemon restarts. However, when IDs cannot be preserved, the daemon maps each
257 previously mapped SID to a new ephemeral UID or GID value. The daemon will
258 never re-use ephemeral UIDs or GIDs. If the \fBidmapd\fR daemon runs out of
259 ephemeral UIDs and GIDs, it returns an error as well as a default UID or GID
260 for SIDs that cannot be mapped by name.
263 The dynamic ID mappings are not retained across reboots. So, any SIDs that are
264 dynamically mapped to UNIX UIDs or GIDs are most likely mapped to different IDs
265 after rebooting the system.
266 .SS "Local SID Mappings"
269 If no name-based mapping is found, a non-ephemeral UID or GID is mapped to an
270 algorithmically generated local SID. The mapping is generated as follows:
272 .in +2
274 local SID for UID = \fI<machine SID>\fR - \fI<1000 + UID>\fR
275 local SID for GID = \fI<machine SID>\fR - \fI<2^31 + GID>\fR
277 .in -2
282 \fI<machine SID>\fR is a unique SID generated by the \fBidmap\fR service for
283 the host on which it runs.
284 .SS "Rule Lookup Order"
287 When mapping a Windows name to a UNIX name, lookup for name-based mapping rules
288 is performed in the following order:
289 .RS +4
292 \fIwindows-name\fR\fB@\fR\fIdomain\fR to \fB""\fR
294 .RS +4
297 \fIwindows-name\fR\fB@\fR\fIdomain\fR to \fIunix-name\fR
299 .RS +4
302 \fIwindows-name\fR\fB@*\fR to \fB""\fR
304 .RS +4
307 \fIwindows-name\fR\fB@*\fR to \fIunix-name\fR
309 .RS +4
312 \fB*@\fR\fIdomain\fR to \fB*\fR
314 .RS +4
317 \fB*@\fR\fIdomain\fR to \fB""\fR
319 .RS +4
322 \fB*@\fR\fIdomain\fR to \fIunix-name\fR
324 .RS +4
327 \fB*@*\fR to \fB*\fR
329 .RS +4
332 \fB*@*\fR to \fB""\fR
334 .RS +4
337 \fB*@*\fR to \fIunix-name\fR
341 When mapping a UNIX name to a Windows name, lookup for name-based mapping rules
342 is performed in the following order:
343 .RS +4
346 \fIunix-name\fR to \fB""\fR
348 .RS +4
351 \fIunix-name\fR to \fIwindows-name\fR\fB@\fR\fIdomain\fR
353 .RS +4
356 \fB*\fR to \fB*@\fR\fIdomain\fR
358 .RS +4
361 \fB*\fR to \fB""\fR
363 .RS +4
366 \fB*\fR to \fIwindows-name\fR\fB@\fR\fIdomain\fR
368 .SS "Service Properties"
371 The service properties determine the behavior of the \fBidmapd\fR(1M) daemon.
372 These properties are stored in the SMF repository (see \fBsmf\fR(5)) under
373 property group \fBconfig\fR. They can be accessed and modified using
374 \fBsvccfg\fR(1M), which requires \fBsolaris.smf.value.idmap\fR authorization.
375 The service properties for the \fBidmap\fR service are:
377 .ne 2
379 \fB\fBconfig/ad_unixuser_attr\fR\fR
381 .sp .6
382 .RS 4n
383 Specify the name of the AD attribute that contains the UNIX user name. There is
384 no default.
388 .ne 2
390 \fB\fBconfig/ad_unixgroup_attr\fR\fR
392 .sp .6
393 .RS 4n
394 Specify the name of the AD attribute that contains the UNIX group name. There
395 is no default.
399 .ne 2
401 \fB\fBconfig/nldap_winname_attr\fR\fR
403 .sp .6
404 .RS 4n
405 Specify the name of the Native LDAP attribute that contains the Windows
406 user/group name. There is no default.
410 .ne 2
412 \fB\fBconfig/directory_based_mapping\fR\fR
414 .sp .6
415 .RS 4n
416 Controls support for identity mapping using data stored in a directory service.
418 \fBnone\fR disables directory-based mapping.
420 \fBname\fR enables name-based mapping using the properties described above.
422 \fBidmu\fR enables mapping using Microsoft's Identity Management for UNIX
423 (IDMU). This Windows component allows the administrator to specify a UNIX user
424 ID for each Windows user, mapping the Windows identity to the corresponding
425 UNIX identity. Only IDMU data from the domain the Solaris system is a member of
426 is used.
431 Changes to service properties do not affect a running \fBidmap\fR service. The
432 service must be refreshed (with \fBsvcadm\fR(1M)) for the changes to take
433 effect.
434 .SH OPERANDS
437 The \fBidmap\fR command uses the following operands:
439 .ne 2
441 \fB\fIformat\fR\fR
443 .sp .6
444 .RS 4n
445 Specifies the format in which user name mappings are described for the
446 \fBexport\fR and \fBimport\fR subcommands. The Netapp \fBusermap.cfg\fR and
447 Samba \fBsmbusers\fR external formats are supported. These external formats are
448 \fBonly\fR for users, not groups.
449 .RS +4
451 .ie t \(bu
452 .el o
453 The \fBusermap.cfg\fR rule-mapping format is as follows:
455 .in +2
457 \fIwindows-username\fR [\fIdirection\fR] \fIunix-username\fR
459 .in -2
462 \fIwindows-username\fR is a Windows user name in either the
463 \fIdomain\fR\e\fIusername\fR or \fIusername\fR\fB@\fR\fIdomain\fR format.
465 \fIunix-username\fR is a UNIX user name.
468 \fIdirection\fR is one of the following:
469 .RS +4
471 .ie t \(bu
472 .el o
473 \fB==\fR means a bidirectional mapping, which is the default.
475 .RS +4
477 .ie t \(bu
478 .el o
479 \fB=>\fR or \fB<=\fR means a unidirectional mapping.
481 The IP qualifier is not supported.
483 .RS +4
485 .ie t \(bu
486 .el o
487 The \fBsmbusers\fR rule-mapping format is as follows:
489 .in +2
491 \fIunixname\fR = \fIwinname1\fR \fIwinname2\fR ...
493 .in -2
496 If \fIwinname\fR includes whitespace, escape the whitespace by enclosing the
497 value in double quotes. For example, the following file shows how to specify
498 whitespace in a valid format for the \fBidmap\fR command:
500 .in +2
502 $ \fBcat myusermap\fR
503 terry="Terry Maddox"
504 pat="Pat Flynn"
505 cal=cbrown
507 .in -2
510 The mappings are imported as unidirectional mappings from Windows names to UNIX
511 names.
513 The format is based on the "username map" entry of the \fBsmb.conf\fR man page,
514 which is available on the \fBsamba.org\fR web site. The use of an asterisk
515 (\fB*\fR) for \fIwindows-name\fR is supported. However, the \fB@group\fR
516 directive and the chaining of mappings are not supported.
518 By default, if no mapping entries are in the \fBsmbusers\fR file, Samba maps a
519 \fIwindows-name\fR to the equivalent \fIunix-name\fR, if any. If you want to
520 set up the same mapping as Samba does, use the following \fBidmap\fR command:
522 .in +2
524 idmap add -d "winuser:*@*" "unixuser:*"
526 .in -2
533 .ne 2
535 \fB\fIidentity\fR\fR
537 .sp .6
538 .RS 4n
539 Specifies a user name, user ID, group name, or group ID. \fIidentity\fR is
540 specified as \fItype\fR\fB:\fR\fIvalue\fR. \fItype\fR is one of the following:
542 .ne 2
544 \fB\fBusid\fR\fR
546 .RS 13n
547 Windows user SID in text format
551 .ne 2
553 \fB\fBgsid\fR\fR
555 .RS 13n
556 Windows group SID in text format
560 .ne 2
562 \fB\fBsid\fR\fR
564 .RS 13n
565 Windows group SID in text format that can belong either to a user or to a group
569 .ne 2
571 \fB\fBuid\fR\fR
573 .RS 13n
574 Numeric POSIX UID
578 .ne 2
580 \fB\fBgid\fR\fR
582 .RS 13n
583 Numeric POSIX GID
587 .ne 2
589 \fB\fBunixuser\fR\fR
591 .RS 13n
592 UNIX user name
596 .ne 2
598 \fB\fBunixgroup\fR\fR
600 .RS 13n
601 UNIX group name
605 .ne 2
607 \fB\fBwinuser\fR\fR
609 .RS 13n
610 Windows user name
614 .ne 2
616 \fB\fBwingroup\fR\fR
618 .RS 13n
619 Windows group name
623 .ne 2
625 \fB\fBwinname\fR\fR
627 .RS 13n
628 Windows user or group name
631 \fIvalue\fR is a number or string that is appropriate to the specified
632 \fItype\fR. For instance, \fBunixgroup:staff\fR specifies the UNIX group name,
633 \fBstaff\fR. The identity \fBgid:10\fR represents GID 10, which corresponds to
634 the UNIX group \fBstaff\fR.
638 .ne 2
640 \fB\fIname\fR\fR
642 .sp .6
643 .RS 4n
644 Specifies a UNIX name (\fBunixuser\fR, \fBunixgroup\fR) or a Windows name
645 (\fBwinuser\fR, \fBwingroup\fR) that can be used for name-based mapping rules.
648 A Windows security entity name can be specified in one of these ways:
649 .RS +4
651 .ie t \(bu
652 .el o
653 \fIdomain\fR\e\fIname\fR
655 .RS +4
657 .ie t \(bu
658 .el o
659 \fIname\fR\fB@\fR\fIdomain\fR
661 .RS +4
663 .ie t \(bu
664 .el o
665 \fIname\fR, which uses the default mapping domain
667 If \fIname\fR is the empty string (\fB""\fR), mapping is inhibited. Note that a
668 name of \fB""\fR should not be used to preclude logins by unmapped Windows
669 users.
671 If \fIname\fR uses the wildcard (\fB*\fR), it matches all names that are not
672 matched by other mappings. Similarly, if \fIname\fR is the wildcard Windows
673 name (\fB*@*\fR), it matches all names in all domains that are not matched by
674 other mappings.
676 If \fIname\fR uses the wildcard on both sides of the mapping rule, the name is
677 the same for both Windows and Solaris users. For example, if the rule is
678 \fB"*@domain" == "*"\fR, the \fBjp@domain\fR Windows user name matches this
679 rule and maps to the \fBjp\fR Solaris user name.
681 Specifying the type of \fIname\fR is optional if the type can be deduced from
682 other arguments or types specified on the command line.
686 .ne 2
688 \fB\fItarget-type\fR\fR
690 .sp .6
691 .RS 4n
692 Used with the \fBshow\fR and \fBunset-namemap\fR subcommands. For \fBshow\fR,
693 specifies the mapping type that should be shown. For example, if
694 \fItarget-type\fR is \fBsid\fR, \fBidmap show\fR returns the SID mapped to the
695 identity specified on the command line. For \fBunset-namemap\fR, identifies an
696 attribute within the object specified by the \fIname\fR operand.
699 .SH OPTIONS
702 The \fBidmap\fR command supports one option and a set of subcommands. The
703 subcommands also have options.
704 .SS "Command-Line Option"
706 .ne 2
708 \fB\fB-f\fR \fIcommand-file\fR\fR
710 .sp .6
711 .RS 4n
712 Reads and executes \fBidmap\fR subcommands from \fIcommand-file\fR. The
713 \fBidmap\fR \fB-f\fR \fB-\fR command reads from standard input. This option is
714 not used by any subcommands.
717 .SS "Subcommands"
720 The following subcommands are supported:
722 .ne 2
724 \fB\fBadd\fR [\fB-d\fR] \fIname1\fR \fIname2\fR\fR
726 .sp .6
727 .RS 4n
728 Adds a name-based mapping rule. By default, the name mapping is bidirectional.
729 If the \fB-d\fR option is used, a unidirectional mapping is created from
730 \fIname1\fR to \fIname2\fR.
732 Either \fIname1\fR or \fIname2\fR must be a Windows name, and the other must be
733 a UNIX name. For the Windows name, the \fBwinname\fR identity type must not be
734 used. Instead, specify one of the \fBwinuser\fR or \fBwingroup\fR types. See
735 "Operands" for information about the \fIname\fR operand.
737 Note that two unidirectional mappings between the same two names in two
738 opposite directions are equivalent to one bidirectional mapping.
740 This subcommand requires the \fBsolaris.admin.idmap.rules\fR authorization.
744 .ne 2
746 \fB\fBdump\fR [\fB-n\fR] [\fB-v\fR]\fR
748 .sp .6
749 .RS 4n
750 Dumps all the mappings cached since the last system boot. The \fB-n\fR option
751 shows the names, as well. By default, only \fBsid\fRs, \fBuid\fRs, and
752 \fBgid\fRs are shown. The \fB-v\fR option shows how the mappings were
753 generated.
757 .ne 2
759 \fB\fBexport\fR [\fB-f\fR \fIfile\fR] \fIformat\fR\fR
761 .sp .6
762 .RS 4n
763 Exports name-based mapping rules to standard output in the specified
764 \fIformat\fR. The \fB-f\fR \fIfile\fR option writes the rules to the specified
765 output file.
769 .ne 2
771 \fB\fBget-namemap\fR \fIname\fR\fR
773 .sp .6
774 .RS 4n
775 Get the directory-based name mapping information from the AD or native LDAP
776 user or group object represented by the specified name.
780 .ne 2
782 \fB\fBhelp\fR\fR
784 .sp .6
785 .RS 4n
786 Displays the usage message.
790 .ne 2
792 \fB\fBimport\fR [\fB-F\fR] [\fB-f\fR \fIfile\fR] \fIformat\fR\fR
794 .sp .6
795 .RS 4n
796 Imports name-based mapping rules from standard input by using the specified
797 \fIformat\fR. The \fB-f\fR \fIfile\fR option reads the rules from the specified
798 file. The \fB-F\fR option flushes existing name-based mapping rules before
799 adding new ones.
801 Regardless of the external format used, the imported rules are processed by
802 using the semantics and order described in the section "Rule Lookup Order,"
803 above.
805 This subcommand requires the \fBsolaris.admin.idmap.rules\fR authorization.
809 .ne 2
811 \fB\fBlist\fR\fR
813 .sp .6
814 .RS 4n
815 Lists all name-based mapping rules. Each rule appears in its \fBidmap add\fR
816 form.
820 .ne 2
822 \fB\fBremove\fR [\fB-t\fR|\fB-f\fR] \fIname\fR\fR
824 .sp .6
825 .RS 4n
826 Removes any name-based mapping rule that involves the specified name.
827 \fIname\fR can be either a UNIX or Windows user name or group name.
829 The \fB-f\fR option removes rules that use \fIname\fR as the source. The
830 \fB-t\fR option removes rules that use \fIname\fR as the destination. These
831 options are mutually exclusive.
833 This subcommand requires the \fBsolaris.admin.idmap.rules\fR authorization.
837 .ne 2
839 \fB\fBremove\fR \fB-a\fR\fR
841 .sp .6
842 .RS 4n
843 Removes all name-based mapping rules.
845 This subcommand requires the \fBsolaris.admin.idmap.rules\fR authorization.
849 .ne 2
851 \fB\fBremove\fR [\fB-d\fR] \fIname1\fR \fIname2\fR\fR
853 .sp .6
854 .RS 4n
855 Removes name-based mapping rules between \fIname1\fR and \fIname2\fR. If the
856 \fB-d\fR option is specified, rules from \fIname1\fR to \fIname2\fR are
857 removed.
859 Either \fIname1\fR or \fIname2\fR must be a Windows name, and the other must be
860 a UNIX name.
862 This subcommand requires the \fBsolaris.admin.idmap.rules\fR authorization.
866 .ne 2
868 \fB\fBset-namemap\fR [\fB-a\fR \fIauthenticationMethod\fR] [\fB-D\fR
869 \fIbindDN\fR] [\fB-j\fR \fIpasswdfile\fR] \fIname1\fR \fIname2\fR\fR
871 .sp .6
872 .RS 4n
873 Sets name mapping information in the AD or native LDAP user or group object.
874 Either \fIname1\fR or \fIname2\fR must be a Windows name, and the other must be
875 a UNIX name.
877 If \fIname1\fR is a Windows name, then the UNIX name \fIname2\fR is added to
878 the AD object represented by \fIname1\fR. Similarly, if \fIname1\fR is a UNIX
879 name then the Windows name \fIname2\fR is added to the native LDAP entry
880 represented by \fIname1\fR.
882 The following options are supported:
884 .ne 2
886 \fB\fB-a\fR \fIauthenticationMethod\fR\fR
888 .sp .6
889 .RS 4n
890 Specify authentication method when modifying native LDAP entry. See
891 \fBldapaddent\fR(1M) for details. Default value is \fBsasl/GSSAPI\fR.
895 .ne 2
897 \fB\fB-D\fR \fIbindDN\fR\fR
899 .sp .6
900 .RS 4n
901 Uses the distinguished name \fIbindDN\fR to bind to the directory.
905 .ne 2
907 \fB\fB-j\fR \fIpasswdfile\fR\fR
909 .sp .6
910 .RS 4n
911 Specify a file containing the password for authentication to the directory.
917 .ne 2
919 \fB\fBshow\fR [\fB-c\fR] [\fB-v\fR] \fIname\fR [\fItarget-type\fR]\fR
921 .sp .6
922 .RS 4n
923 Shows the identity of type, \fItarget-type\fR, that the specified \fIname\fR
924 maps to. If the optional \fItarget-type\fR is omitted, the non-diagonal mapping
925 is shown.
927 By default, this subcommand shows only mappings that have been established
928 already. The \fB-c\fR option forces the evaluation of name-based mapping
929 configurations or the dynamic allocation of IDs.
931 The \fB-v\fR option shows how the mapping was generated and also whether the
932 mapping was just generated or was retrieved from the cache.
936 .ne 2
938 \fB\fBunset-namemap\fR [\fB-a\fR \fIauthenticationMethod\fR] [\fB-D\fR
939 \fIbindDN\fR] [\fB-j\fR \fIpasswdfile\fR] \fIname\fR [\fItarget-type\fR]\fR
941 .sp .6
942 .RS 4n
943 Unsets directory-based name mapping information from the AD or native LDAP user
944 or group object represented by the specified name and optional target type.
946 See the \fBset-namemap\fR subcommand for options.
949 .SH EXAMPLES
951 \fBExample 1 \fRUsing a Wildcard on Both Sides of a Name-Based Mapping Rule
954 The following command maps all Windows user names in the \fBxyz.com\fR domain
955 to the UNIX users with the same names provided that one exists and is not
956 otherwise mapped. If such a rule is matched but the UNIX user name does not
957 exist, an ephemeral ID mapping is used.
960 .in +2
962 # \fBidmap add "winuser:*@xyz.com" "unixuser:*"\fR
964 .in -2
968 \fBExample 2 \fRUsing a Wildcard on One Side of a Name-Based Mapping Rule
971 The following command maps all unmapped Windows users in the \fBxyz.com\fR
972 domain to the \fBguest\fR UNIX user. The \fB-d\fR option specifies a
973 unidirectional mapping from \fB*@xyz.com\fR users to the \fBguest\fR user.
976 .in +2
978 # \fBidmap add -d "winuser:*@xyz.com" unixuser:guest\fR
980 .in -2
984 \fBExample 3 \fRAdding a Bidirectional Name-Based Mapping Rule
987 The following command maps Windows user, \fBfoobar@example.com\fR, to UNIX
988 user, \fBfoo\fR, and conversely:
991 .in +2
993 # \fBidmap add winuser:foobar@example.com unixuser:foo\fR
995 .in -2
1000 This command shows how to remove the mapping added by the previous command:
1003 .in +2
1005 # \fBidmap remove winuser:foobar@example.com unixuser:foo\fR
1007 .in -2
1011 \fBExample 4 \fRShowing a UID-to-SID Mapping
1012 .RS +4
1014 .ie t \(bu
1015 .el o
1016 The following command shows the SID that the specified UID, \fBuid:50000\fR,
1017 maps to:
1019 .in +2
1021 # \fBidmap show uid:50000 sid\fR
1022 uid:50000 -> usid:S-1-5-21-3223191800-2000
1024 .in -2
1028 .RS +4
1030 .ie t \(bu
1031 .el o
1032 The following command shows the UNIX user name that the specified Windows user
1033 name, \fBjoe@example.com\fR, maps to:
1035 .in +2
1037 # \fBidmap show joe@example.com unixuser\fR
1038 winuser:joe@example.com -> unixuser:joes
1040 .in -2
1045 \fBExample 5 \fRListing the Cached SID-to-UID Mappings
1048 The following command shows all of the SID-to-UID mappings that are in the
1049 cache:
1052 .in +2
1054 # \fBidmap dump | grep "uid:"\fR
1055 usid:S-1-5-21-3223191800-2000    ==     uid:50000
1056 usid:S-1-5-21-3223191800-2001    ==     uid:50001
1057 usid:S-1-5-21-3223191800-2006    ==     uid:50010
1058 usid:S-1-5-21-3223191900-3000    ==     uid:2147491840
1059 usid:S-1-5-21-3223191700-4000    =>     uid:60001
1061 .in -2
1065 \fBExample 6 \fRBatching \fBidmap\fR Requests
1068 The following commands show how to batch \fBidmap\fR requests. This particular
1069 command sequence does the following:
1071 .RS +4
1073 .ie t \(bu
1074 .el o
1075 Removes any previous rules for \fBfoobar@example.com\fR.
1077 .RS +4
1079 .ie t \(bu
1080 .el o
1081 Maps Windows user \fBfoobar@example.com\fR to UNIX user \fBbar\fR and
1082 vice-versa.
1084 .RS +4
1086 .ie t \(bu
1087 .el o
1088 Maps Windows group \fBmembers\fR to UNIX group \fBstaff\fR and vice-versa.
1091 .in +2
1093 # \fBidmap <<EOF\fR
1094        \fBremove winuser:foobar@example.com\fR
1095        \fBadd winuser:foobar@example.com unixuser:bar\fR
1096        \fBadd wingroup:members unixgroup:staff\fR
1097 \fBEOF\fR
1099 .in -2
1103 \fBExample 7 \fRListing Name-Based Mapping Rules
1106 The following command shows how to list the name-based mapping rules:
1109 .in +2
1111 # \fBidmap list\fR
1112 add winuser:foobar@example.com unixuser:bar
1113 add wingroup:members unixgroup:staff
1115 .in -2
1119 \fBExample 8 \fRImporting Name-Based Mapping Rules From the \fBusermap.cfg\fR
1120 File
1123 The \fBusermap.cfg\fR file can be used to configure name-based mapping rules.
1124 The following \fBusermap.cfg\fR file shows mapping rules that map Windows user
1125 \fBfoo@example.com\fR to UNIX user \fBfoo\fR, and that map
1126 \fBfoobar@example.com\fR to the UNIX user \fBfoo\fR.
1129 .in +2
1131 # \fBcat usermap.cfg\fR
1132 foo@example.com == foo
1133 foobar@example.com => foo
1135 .in -2
1140 The following \fBidmap\fR command imports \fBusermap.cfg\fR information to the
1141 \fBidmapd\fR database:
1144 .in +2
1146 # \fBcat usermap.cfg | idmap import usermap.cfg\fR
1148 .in -2
1153 This command does the same as the previous command:
1156 .in +2
1158 # \fBidmap import -f usermap.cfg usermap.cfg\fR
1160 .in -2
1165 The following commands are equivalent to the previous \fBidmap import\fR
1166 commands:
1169 .in +2
1171 # \fBidmap <<EOF\fR
1172        \fBadd winuser:foo@example.com unixuser:foo\fR
1173        \fBadd -d winuser:foobar@example.com unixuser:foo\fR
1174 \fBEOF\fR
1176 .in -2
1180 \fBExample 9 \fRUsing Name-Based and Ephemeral ID Mapping With Identity
1181 Function Mapping and Exceptions
1184 The following commands map all users in the \fBexample.com\fR Windows domain to
1185 UNIX user accounts of the same name. The command also specifies mappings for
1186 the following Windows users: \fBjoe@example.com\fR, \fBjane.doe@example.com\fR,
1187 \fBadministrator@example.com\fR. The \fBadministrator\fR from all domains is
1188 mapped to \fBnobody\fR. Any Windows users without corresponding UNIX accounts
1189 are mapped dynamically to available ephemeral UIDs.
1192 .in +2
1194 # \fBidmap import usermap.cfg <<EOF\fR
1195        \fBjoe@example.com == joes\fR
1196        \fBjane.doe@example.com == janed\fR
1197        \fBadministrator@* => nobody\fR
1198        \fB*@example.com == *\fR
1199        \fB*@example.com => nobody\fR
1200 \fBEOF\fR
1202 .in -2
1206 \fBExample 10 \fRAdding Directory-based Name Mapping to AD User Object
1209 The following command maps Windows user \fBjoe@example.com\fR to UNIX user
1210 \fBjoe\fR by adding the UNIX name to AD object for \fBjoe@example.com\fR.
1213 .in +2
1215 # \fBidmap set-namemap winuser:joe@example.com joes\fR
1217 .in -2
1221 \fBExample 11 \fRAdding Directory-based Name Mapping to Native LDAP User Object
1224 The following command maps UNIX user \fBfoo\fR to Windows user
1225 \fBfoobar@example.com\fR by adding the Windows name to native LDAP object for
1226 \fBfoo\fR.
1229 .in +2
1231 # \fBidmap set-namemap unixuser:foo foobar@example.com\fR
1233 .in -2
1237 \fBExample 12 \fRRemoving Directory-based Name Mapping from AD User Object
1240 The following command removes the UNIX username \fBunixuser\fR from the AD
1241 object representing \fBjoe@example.com\fR.
1244 .in +2
1246 # \fBidmap unset-namemap winuser:joe@example.com unixuser\fR
1248 .in -2
1251 .SH EXIT STATUS
1253 .ne 2
1255 \fB\fB0\fR\fR
1257 .RS 6n
1258 Successful completion.
1262 .ne 2
1264 \fB\fB>0\fR\fR
1266 .RS 6n
1267 An error occurred. A diagnostic message is written to standard error.
1270 .SH ATTRIBUTES
1273 See \fBattributes\fR(5) for descriptions of the following attributes:
1278 box;
1279 c | c
1280 l | l .
1281 ATTRIBUTE TYPE  ATTRIBUTE VALUE
1283 Interface Stability     Uncommitted
1286 .SH SEE ALSO
1289 \fBsvcs\fR(1), \fBidmapd\fR(1M), \fBldapaddent\fR(1M), \fBsvcadm\fR(1M),
1290 \fBsvccfg\fR(1M), \fBattributes\fR(5), \fBsmf\fR(5)
1291 .SH NOTES
1294 The \fBidmapd\fR service is managed by the service management facility,
1295 \fBsmf\fR(5). The service identifier for the \fBidmapd\fR service is
1296 \fBsvc:/system/idmap\fR.
1299 Use the \fBsvcadm\fR command to perform administrative actions on this service,
1300 such as enabling, disabling, or restarting the service. These actions require
1301 the \fBsolaris.smf.manage.idmap\fR authorization. Use the \fBsvcs\fR command to
1302 query the service's status.
1305 Windows user names are case-insensitive, while UNIX user names are
1306 case-sensitive. The case of Windows names as they appear in \fBidmap\fR
1307 name-rules and \fBidmap show\fR command lines is irrelevant.
1310 Because common practice in UNIX environments is to use all-lowercase user
1311 names, wildcard name-rules map Windows names to UNIX user/group names as
1312 follows: first, the canonical Windows name (that is, in the case as it appears
1313 in the directory) is used as a UNIX user or group name. If there is no such
1314 UNIX entity, then the Windows name's case is folded to lowercase and the result
1315 is used as the UNIX user or group name.
1318 As a result of this differing treatment of case, user names that appear to be
1319 alike might not be recognized as matches. You must create rules to handle such
1320 pairings of strings that differ only in case. For example, to map the Windows
1321 user \fBsam@example\fR to the Solaris user \fBSam\fR, you must create the
1322 following rules:
1324 .in +2
1326 # \fBidmap add "winuser:*@example" "unixuser:*"\fR
1327 # \fBidmap add winuser:sam@example unixuser:Sam\fR
1329 .in -2
1334 For guidance on modifying an Active Directory schema, consult the Microsoft
1335 document, \fIStep-by-Step Guide to Using Active Directory Schema and Display
1336 Specifiers\fR, which you can find at their \fBtechnet\fR web site,
1337 http://technet.microsoft.com/\&.