docs:smbdotconf: make formatting of headers uniform.
[Samba.git] / docs-xml / smbdotconf / printing / addprintercommand.xml
blobc39296df60159305d29d3c3ffdd2f26b6acfccc4
1 <samba:parameter name="addprinter command"
2                  context="G"
3                  type="string"
4                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
5 <description>
6     <para>With the introduction of MS-RPC based printing
7     support for Windows NT/2000 clients in Samba 2.2, The MS Add
8     Printer Wizard (APW) icon is now also available in the 
9     &quot;Printers...&quot; folder displayed a share listing.  The APW
10     allows for printers to be add remotely to a Samba or Windows 
11     NT/2000 print server.</para>
12                 
13     <para>For a Samba host this means that the printer must be 
14     physically added to the underlying printing system.
15     The <parameter moreinfo="none">addprinter command</parameter>
16     defines a script to be run which
17     will perform the necessary operations for adding the printer
18     to the print system and to add the appropriate service definition 
19     to the  <filename moreinfo="none">smb.conf</filename> file in order that it can be 
20     shared by <citerefentry><refentrytitle>smbd</refentrytitle>
21     <manvolnum>8</manvolnum></citerefentry>.</para>
22                 
23     <para>The <parameter moreinfo="none">addprinter command</parameter> is
24     automatically invoked with the following parameter (in 
25     order):</para>
26                 
27     <itemizedlist>
28         <listitem><para><parameter moreinfo="none">printer name</parameter></para></listitem>
29         <listitem><para><parameter moreinfo="none">share name</parameter></para></listitem>
30         <listitem><para><parameter moreinfo="none">port name</parameter></para></listitem>
31         <listitem><para><parameter moreinfo="none">driver name</parameter></para></listitem>
32         <listitem><para><parameter moreinfo="none">location</parameter></para></listitem>
33         <listitem><para><parameter moreinfo="none">Windows 9x driver location</parameter></para></listitem>
34     </itemizedlist>
35                 
36     <para>All parameters are filled in from the PRINTER_INFO_2 structure sent 
37     by the Windows NT/2000 client with one exception.  The &quot;Windows 9x
38     driver location&quot; parameter is included for backwards compatibility
39     only.  The remaining fields in the structure are generated from answers
40     to the APW questions.</para>
42     <para>Once the <parameter moreinfo="none">addprinter command</parameter> has 
43     been executed, <command moreinfo="none">smbd</command> will reparse the <filename moreinfo="none">
44     smb.conf</filename> to determine if the share defined by the APW
45     exists.  If the sharename is still invalid, then <command moreinfo="none">smbd
46     </command> will return an ACCESS_DENIED error to the client.</para>
48     <para>
49     The <parameter moreinfo="none">addprinter command</parameter> program
50     can output a single line of text,
51     which Samba will set as the port the new printer is connected to. 
52     If this line isn't output, Samba won't reload its printer shares.
53     </para>
54                 
55 </description>
57 <related>deleteprinter command</related>
58 <related>printing</related>
59 <related>show add printer wizard</related>
61 <value type="default"></value>
62 <value type="example">/usr/bin/addprinter</value>
63 </samba:parameter>