ctdb-server: Remove duplicate logic
[samba4-gss.git] / docs-xml / manpages / idmap_autorid.8.xml
blob9fe73d5c4737aba081ea7994e4b2a6675fe7d2aa
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">
5 <refmeta>
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>
11 </refmeta>
14 <refnamediv>
15         <refname>idmap_autorid</refname>
16         <refpurpose>Samba's idmap_autorid Backend for Winbind</refpurpose>
17 </refnamediv>
19 <refsynopsisdiv>
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
29         to be used.</para>
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>
34 </refsynopsisdiv>
36 <refsect1>
37         <title>IDMAP OPTIONS</title>
39         <variablelist>
40                 <varlistentry>
41                 <term>range = low - high</term>
42                 <listitem><para>
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.
58                 </para></listitem>
59                 </varlistentry>
61                 <varlistentry>
62                 <term>rangesize = numberofidsperrange</term>
63                 <listitem><para>
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.
72                         </para>
73                         <para>
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.
79                         </para>
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>
84                         <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.
88                         </para>
89                 <para>The default value is 100000.</para>
90                 </listitem>
91                 </varlistentry>
92                 <varlistentry>
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>
96                 </listitem>
97                 </varlistentry>
98                 <varlistentry>
99                 <term>ignore builtin = [ yes | no ]</term>
100                 <listitem><para>Ignore any mapping requests for the BUILTIN domain.
101                         Defaults to no.</para>
102                 </listitem>
103                 </varlistentry>
104         </variablelist>
105 </refsect1>
107 <refsect1>
108         <title>THE MAPPING FORMULAS</title>
109         <para>
110                 The Unix ID for a RID is calculated this way:
111                 <programlisting>
112                         ID =  REDUCED RID + IDMAP RANGE LOW VALUE + RANGE NUMBER * RANGE SIZE
113                 </programlisting>
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).
117         </para>
118         <para>
119                 Correspondingly, the formula for calculating the RID for a
120                 given Unix ID is this:
121                 <programlisting>
122                         RID = (ID - LOW ID) % RANGE SIZE + DOMAIN RANGE INDEX * RANGE SIZE
123                 </programlisting>
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 .
126         </para>
127 </refsect1>
129 <refsect1>
130         <title>EXAMPLES</title>
131         <para>
132                 This example shows you the minimal configuration that will
133                 work for the principal domain and 19 trusted domains / range
134                 extensions.
135         </para>
137         <programlisting>
138         [global]
139         security = ads
140         workgroup = CUSTOMER
141         realm = CUSTOMER.COM
143         idmap config * : backend = autorid
144         idmap config * : range = 1000000-1999999
146         </programlisting>
148         <para>
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.
154         </para>
156         <programlisting>
157         [global]
158         security = ads
159         workgroup = CUSTOMER
160         realm = CUSTOMER.COM
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
169         </programlisting>
171 </refsect1>
173 <refsect1>
174         <title>AUTHOR</title>
176         <para>
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.
181         </para>
182 </refsect1>
184 </refentry>