s3:docs: add a manpage for idmap_tdb2
[metze/samba/wip.git] / docs-xml / manpages-3 / idmap_tdb2.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_tdb2.8">
4
5 <refmeta>
6         <refentrytitle>idmap_tdb2</refentrytitle>
7         <manvolnum>8</manvolnum>
8         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10         <refmiscinfo class="version">3.3</refmiscinfo>
11 </refmeta>
12
13
14 <refnamediv>
15         <refname>idmap_tdb2</refname>
16         <refpurpose>Samba's idmap_tdb2 Backend for Winbind</refpurpose>
17 </refnamediv>
18
19 <refsynopsisdiv>
20         <title>DESCRIPTION</title>
21
22         <para>
23         The idmap_tdb2 plugin is a substitute for the default idmap_tdb
24         backend used by winbindd for storing SID/uid/gid mapping tables
25         in clustered environments with Samba and CTDB.
26         </para>
27
28         <para>
29         In contrast to read only
30         backends like idmap_rid, it is an allocating backend:
31         This means that it needs to allocate new user and group IDs
32         to create new mappings as requests to yet unmapped users are answered.
33         </para>
34
35         <para>
36         Note that in order for this (or any other allocating) backend to
37         function at all, the default backend needs to be writeable.
38         The ranges used for uid and gid allocation are the default ranges
39         configured by &quot;idmap uid&quot; and &quot;idmap gid&quot;.
40         </para>
41
42         <para>
43         Furthermore, since there is only one global allocating backend
44         responsible for all domains using writeable idmap backends,
45         any explicitly configured domain with idmap backend tdb2
46         should have the same range as the default range, since it needs
47         to use the global uid / gid allocator. See the example below.
48         </para>
49 </refsynopsisdiv>
50
51 <refsect1>
52         <title>IDMAP OPTIONS</title>
53
54         <variablelist>
55                 <varlistentry>
56                 <term>range = low - high</term>
57                 <listitem><para>
58                         Defines the available matching uid and gid range for which the
59                         backend is authoritative.
60                         If the parameter is absent, Winbind fails over to use
61                         the &quot;idmap uid&quot; and &quot;idmap gid&quot; options
62                         from smb.conf.
63                 </para></listitem>
64                 </varlistentry>
65         </variablelist>
66 </refsect1>
67
68 <refsect1>
69         <title>IDMAP SCRIPT</title>
70
71         <para>
72         The tdb2 idmap backend supports a script for performing id mappings
73         through the smb.conf option <parameter>idmap : script</parameter>.
74         The script should accept the following command line options.
75         </para>
76
77         <programlisting>
78         SIDTOID S-1-xxxx
79         IDTOSID UID xxxx
80         IDTOSID GID xxxx
81         </programlisting>
82
83         <para>
84         And it should return one of the following responses as a single line of
85         text.
86         </para>
87
88         <programlisting>
89         UID:yyyy
90         GID:yyyy
91         SID:yyyy
92         ERR:yyyy
93         </programlisting>
94
95         <para>
96         Note that the script should cover the complete range of SIDs
97         that can be passed in for SID to Unix ID mapping, since otherwise
98         SIDs unmapped by the script might get mapped to IDs that had
99         previously been mapped by the script.
100         </para>
101 </refsect1>
102
103 <refsect1>
104         <title>EXAMPLES</title>
105
106         <para>
107         This example shows how tdb2 is used as a the default idmap backend.
108         It configures the idmap range through the global options for all
109         domains encountered. This same range is used for uid/gid allocation.
110         </para>
111
112         <programlisting>
113         [global]
114         # "idmap backend = tdb2" is redundant here since it is the default
115         idmap backend = tdb2
116         idmap uid = 1000000-2000000
117         idmap gid = 1000000-2000000
118         </programlisting>
119 </refsect1>
120
121 <refsect1>
122         <title>AUTHOR</title>
123
124         <para>
125         The original Samba software and related utilities
126         were created by Andrew Tridgell. Samba is now developed
127         by the Samba Team as an Open Source project similar
128         to the way the Linux kernel is developed.
129         </para>
130 </refsect1>
131
132 </refentry>