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