Next update of VFS modules development guide
[vlendec/samba-autobuild/.git] / docs-xml / smbdotconf / misc / addsharecommand.xml
1 <samba:parameter name="add share command"
2                  context="G"
3                                  type="string"
4                  advanced="1" developer="1"
5                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
6 <description>
7         <para>
8         Samba 2.2.0 introduced the ability to dynamically add and delete shares via the Windows NT 4.0 Server
9         Manager.  The <parameter moreinfo="none">add share command</parameter> is used to define an external program
10         or script which will add a new service definition to <filename moreinfo="none">smb.conf</filename>.  In order
11         to successfully execute the <parameter moreinfo="none">add share command</parameter>, <command
12         moreinfo="none">smbd</command> requires that the administrator be connected using a root account (i.e.  uid == 0).
13         </para>
14
15     <para>
16     If the connected account has <literal>SeDiskOperatorPrivilege</literal>, scripts defined in
17     <parameter moreinfo="none">change share</parameter> parameter are executed as root.
18     </para>
19
20         <para>
21         When executed, <command moreinfo="none">smbd</command> will automatically invoke the
22         <parameter moreinfo="none">add share command</parameter> with five parameters.
23         </para>
24
25         <itemizedlist>
26                 <listitem>
27                         <para><parameter moreinfo="none">configFile</parameter> - the location of the global <filename
28                         moreinfo="none">smb.conf</filename> file.
29                         </para>
30                 </listitem>
31
32                 <listitem>
33                         <para><parameter moreinfo="none">shareName</parameter> - the name of the new share.
34                         </para>
35                 </listitem>
36
37                 <listitem>
38                         <para><parameter moreinfo="none">pathName</parameter> - path to an **existing**
39                         directory on disk.
40                         </para>
41                 </listitem>
42
43                 <listitem>
44                         <para><parameter moreinfo="none">comment</parameter> - comment string to associate with the new
45                         share.
46                         </para>
47                 </listitem>
48
49                 <listitem>
50                         <para><parameter moreinfo="none">max
51                         connections</parameter>
52                         Number of maximum simultaneous connections to this
53                         share.
54                         </para>
55                 </listitem>
56         </itemizedlist>
57
58         <para>
59         This parameter is only used for add file shares.  To add printer shares, see the <smbconfoption
60         name="addprinter command"/>.
61         </para>
62 </description>
63
64 <related>change share command</related>
65 <related>delete share command</related>
66 <value type="default"></value>
67 <value type="example">/usr/local/bin/addshare</value>
68 </samba:parameter>