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