1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="idmap_autorid.8">
6 <refentrytitle>idmap_autorid</refentrytitle>
7 <manvolnum>8</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10 <refmiscinfo class="version">&doc.version;</refmiscinfo>
15 <refname>idmap_autorid</refname>
16 <refpurpose>Samba's idmap_autorid Backend for Winbind</refpurpose>
20 <title>DESCRIPTION</title>
21 <para>The idmap_autorid backend provides a way to use an algorithmic
22 mapping scheme to map UIDs/GIDs and SIDs that is more deterministic
23 than idmap_tdb and easier to configure than idmap_rid.</para>
24 <para>The module works similar to idmap_rid, but it automatically
25 configures the range to be used for each domain, so there is no need
26 to specify a specific range for each domain in the forest, the only
27 configuration that is needed is the range of uid/gids that shall
28 be used for user/group mappings and an optional size of the ranges
30 <para>The mappings of which domain is mapped to which range is stored
31 in autorid.tdb, thus you should backup this database regularly.</para>
32 <para>Due to the algorithm being used, it is the module that is
33 most easy to use as it only requires a minimal configuration.</para>
37 <title>IDMAP OPTIONS</title>
41 <term>range = low - high</term>
43 Defines the available matching uid and gid
44 range for which the backend is
45 authoritative. Note that the range acts as a
46 filter. If algorithmically determined UID or
47 GID fall outside the range, they are ignored
48 and the corresponding map is discarded. It is
49 intended as a way to avoid accidental UID/GID
50 overlaps between local and remotely defined
51 IDs. Note that the range should be a multiple
52 of the rangesize and needs to be at least twice
53 as large in order to have sufficient id range
54 space for the mandatory BUILTIN domain.
55 With a default rangesize of 100000 the range
56 needs to span at least 200000.
57 This would be: range = 100000 - 299999.
62 <term>rangesize = numberofidsperrange</term>
64 Defines the number of uids/gids available per
65 domain range. The minimum needed value is 2000.
66 SIDs with RIDs larger than this value will be mapped
67 into extension ranges depending upon number of available
68 ranges. If the autorid backend runs out of available
69 ranges, mapping requests for new domains (or new
70 extension ranges for domains already known) are ignored
71 and the corresponding map is discarded.
74 Example: with rangesize set to 10000, users/groups with
75 a RID up to 10000 will be put into the first range for the
76 domain. When attempting to map the an object with a RID
77 of 25000, an extension range will be allocated that
78 will then be used to map all RIDs from 20000-29999.
80 <para>One range will be used for local users and groups and for
81 non-domain well-known SIDs like Everyone (S-1-1-0) or Creator Owner (S-1-3-0).
82 A chosen list of well-known SIDs will be preallocated on first start
83 to create deterministic mappings for those.</para>
85 Thus the number of local users and groups that can be created is
86 limited by this option as well. If you plan to create a large amount
87 of local users or groups, you will need set this parameter accordingly.
89 <para>The default value is 100000.</para>
93 <term>read only = [ yes | no ]</term>
94 <listitem><para>Turn the module into read-only mode. No new ranges will be allocated
95 nor will new mappings be created in the idmap pool. Defaults to no.</para>
99 <term>ignore builtin = [ yes | no ]</term>
100 <listitem><para>Ignore any mapping requests for the BUILTIN domain.
101 Defaults to no.</para>
108 <title>THE MAPPING FORMULAS</title>
110 The Unix ID for a RID is calculated this way:
112 ID = REDUCED RID + IDMAP RANGE LOW VALUE + RANGE NUMBER * RANGE SIZE
114 where REDUCED RID = RID % RANGE_SIZE
115 and a DOMAIN RANGE INDEX = RID / RANGE_SIZE is used together with the
116 domain sid to determine the RANGE NUMBER (stored in the database).
119 Correspondingly, the formula for calculating the RID for a
120 given Unix ID is this:
122 RID = (ID - LOW ID) % RANGE SIZE + DOMAIN RANGE INDEX * RANGE SIZE
124 Where the DOMAIN RANGE INDEX is retrieved from the database along with the
125 domain sid by the RANGE NUMBER = (ID - LOW ID) / RANGE SIZE .
130 <title>EXAMPLES</title>
132 This example shows you the minimal configuration that will
133 work for the principal domain and 19 trusted domains / range
143 idmap config * : backend = autorid
144 idmap config * : range = 1000000-1999999
149 This example shows how to configure idmap_autorid as default
150 for all domains with a potentially large amount of users
151 plus a specific configuration for a trusted domain
152 that uses the SFU mapping scheme. Please note that idmap
153 ranges and sfu ranges are not allowed to overlap.
162 idmap config * : backend = autorid
163 idmap config * : range = 1000000-19999999
164 idmap config * : rangesize = 1000000
166 idmap config TRUSTED : backend = ad
167 idmap config TRUSTED : range = 50000 - 99999
168 idmap config TRUSTED : schema_mode = sfu
174 <title>AUTHOR</title>
177 The original Samba software and related utilities
178 were created by Andrew Tridgell. Samba is now developed
179 by the Samba Team as an Open Source project similar
180 to the way the Linux kernel is developed.