syncing docs from 3.0 tree (thanks jelmer).
[Samba.git] / docs / docbook / smbdotconf / logon / adduserscript.xml
blob42f7b045637c735ee590248d190e43d3086ddb54
1 <samba:parameter name="add user script"
2                  context="G"
3                  advanced="1" developer="1"
4                  xmlns:samba="http://samba.org/common">
5 <listitem>
6         <para>This is the full pathname to a script that will 
7         be run <emphasis>AS ROOT</emphasis> by <citerefentry><refentrytitle>smbd</refentrytitle>
8         <manvolnum>8</manvolnum></citerefentry> under special circumstances described below.</para>
10         <para>Normally, a Samba server requires that UNIX users are 
11         created for all users accessing files on this server. For sites 
12         that use Windows NT account databases as their primary user database 
13         creating these users and keeping the user list in sync with the 
14         Windows NT PDC is an onerous task. This option allows smbd to create the required UNIX users 
15         <emphasis>ON DEMAND</emphasis> when a user accesses the Samba server.</para>
17         <para>In order to use this option, <citerefentry><refentrytitle>smbd</refentrytitle>
18         <manvolnum>8</manvolnum></citerefentry> must <emphasis>NOT</emphasis> be set to <parameter moreinfo="none">security = share</parameter>
19         and <parameter moreinfo="none">add user script</parameter>
20         must be set to a full pathname for a script that will create a UNIX 
21         user given one argument of <parameter moreinfo="none">%u</parameter>, which expands into 
22         the UNIX user name to create.</para>
24         <para>When the Windows user attempts to access the Samba server, 
25         at login (session setup in the SMB protocol) time, <citerefentry><refentrytitle>smbd</refentrytitle>
26         <manvolnum>8</manvolnum></citerefentry> contacts the <parameter moreinfo="none">password server</parameter> and 
27         attempts to authenticate the given user with the given password. If the 
28         authentication succeeds then <command moreinfo="none">smbd</command> 
29         attempts to find a UNIX user in the UNIX password database to map the 
30         Windows user into. If this lookup fails, and <parameter moreinfo="none">add user script
31         </parameter> is set then <command moreinfo="none">smbd</command> will
32         call the specified script <emphasis>AS ROOT</emphasis>, expanding 
33         any <parameter moreinfo="none">%u</parameter> argument to be the user name to create.</para>
35         <para>If this script successfully creates the user then <command moreinfo="none">smbd
36         </command> will continue on as though the UNIX user
37         already existed. In this way, UNIX users are dynamically created to
38         match existing Windows NT accounts.</para>
40         <para>See also <link linkend="SECURITY"><parameter moreinfo="none">
41         security</parameter></link>, <link linkend="PASSWORDSERVER">
42         <parameter moreinfo="none">password server</parameter></link>, 
43         <link linkend="DELETEUSERSCRIPT"><parameter moreinfo="none">delete user 
44         script</parameter></link>.</para>
46         <para>Default: <command moreinfo="none">add user script = &lt;empty string&gt;</command></para> 
48         <para>Example: <command moreinfo="none">add user script = /usr/local/samba/bin/add_user %u</command></para>
49 </listitem>
50 </samba:parameter>