docs: Bump version up to 4.7.
[bbaumbach/samba-autobuild/.git] / docs-xml / manpages / idmap_autorid.8.xml
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">
4
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">4.7</refmiscinfo>
11 </refmeta>
12
13
14 <refnamediv>
15         <refname>idmap_autorid</refname>
16         <refpurpose>Samba's idmap_autorid Backend for Winbind</refpurpose>
17 </refnamediv>
18
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>
35
36 <refsect1>
37         <title>IDMAP OPTIONS</title>
38
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.
52                 </para></listitem>
53                 </varlistentry>
54
55                 <varlistentry>
56                 <term>rangesize = numberofidsperdomain</term>
57                 <listitem><para>
58                         Defines the number of uids/gids available per
59                         domain range. The minimum needed value is 2000.
60                         SIDs with RIDs larger than this value will be mapped
61                         into extension ranges depending upon number of available
62                         ranges. If the autorid backend runs out of available
63                         ranges, mapping requests for new domains (or new
64                         extension ranges for domains already known) are ignored
65                         and the corresponding map is discarded.
66                         </para>
67                         <para>
68                         Example: with rangesize set to 10000, users/groups with
69                         a RID up to 10000 will be put into the first range for the
70                         domain. When attempting to map the an object with a RID
71                         of 25000, an extension range will be allocated that
72                         will then be used to map all RIDs from 20000-29999.
73                         </para>
74                         <para>One range will be used for local users and groups and for
75                         non-domain well-known SIDs like Everyone (S-1-1-0) or Creator Owner (S-1-3-0).
76                         A chosen list of well-known SIDs will be preallocated on first start
77                         to create deterministic mappings for those.</para>
78                         <para>
79                         Thus the number of local users and groups that can be created is
80                         limited by this option as well. If you plan to create a large amount
81                         of local users or groups, you will need set this parameter accordingly.
82                         </para>
83                 <para>The default value is 100000.</para>
84                 </listitem>
85                 </varlistentry>
86                 <varlistentry>
87                 <term>read only = [ yes | no ]</term>
88                 <listitem><para>Turn the module into read-only mode. No new ranges will be allocated
89                         nor will new mappings be created in the idmap pool. Defaults to no.</para>
90                 </listitem>
91                 </varlistentry>
92                 <varlistentry>
93                 <term>ignore builtin = [ yes | no ]</term>
94                 <listitem><para>Ignore any mapping requests for the BUILTIN domain.
95                         Defaults to no.</para>
96                 </listitem>
97                 </varlistentry>
98         </variablelist>
99 </refsect1>
100
101 <refsect1>
102         <title>THE MAPPING FORMULAS</title>
103         <para>
104                 The Unix ID for a RID is calculated this way:
105                 <programlisting>
106                         ID =  REDUCED RID + IDMAP RANGE LOW VALUE + RANGE NUMBER * RANGE SIZE
107                 </programlisting>
108                 where REDUCED RID = RID % RANGE_SIZE
109                 and a DOMAIN RANGE INDEX = RID / RANGE_SIZE is used together with the
110                 domain sid to determine the RANGE NUMBER (stored in the database).
111         </para>
112         <para>
113                 Correspondingly, the formula for calculating the RID for a
114                 given Unix ID is this:
115                 <programlisting>
116                         RID = (ID - LOW ID) % RANGE SIZE + DOMAIN RANGE INDEX * RANGE SIZE
117                 </programlisting>
118                 Where the DOMAIN RANGE INDEX is retrieved from the database along with the
119                 domain sid by the RANGE NUMBER = (ID - LOW ID) / RANGE SIZE .
120         </para>
121 </refsect1>
122
123 <refsect1>
124         <title>EXAMPLES</title>
125         <para>
126                 This example shows you the minimal configuration that will
127                 work for the principal domain and 19 trusted domains / range
128                 extensions.
129         </para>
130
131         <programlisting>
132         [global]
133         security = ads
134         workgroup = CUSTOMER
135         realm = CUSTOMER.COM
136
137         idmap config * : backend = autorid
138         idmap config * : range = 1000000-1999999
139
140         </programlisting>
141
142         <para>
143                 This example shows how to configure idmap_autorid as default
144                 for all domains with a potentially large amount of users
145                 plus a specific configuration for a trusted domain
146                 that uses the SFU mapping scheme. Please note that idmap
147                 ranges and sfu ranges are not allowed to overlap.
148         </para>
149
150         <programlisting>
151         [global]
152         security = ads
153         workgroup = CUSTOMER
154         realm = CUSTOMER.COM
155
156         idmap config * : backend = autorid
157         idmap config * : range = 1000000-19999999
158         idmap config * : rangesize = 1000000
159
160         idmap config TRUSTED : backend  = ad
161         idmap config TRUSTED : range    = 50000 - 99999
162         idmap config TRUSTED : schema_mode = sfu
163         </programlisting>
164
165 </refsect1>
166
167 <refsect1>
168         <title>AUTHOR</title>
169
170         <para>
171         The original Samba software and related utilities
172         were created by Andrew Tridgell. Samba is now developed
173         by the Samba Team as an Open Source project similar
174         to the way the Linux kernel is developed.
175         </para>
176 </refsect1>
177
178 </refentry>