With the introduction of MS-RPC based printing
support for Windows NT/2000 clients in Samba 2.2, The MS Add
Printer Wizard (APW) icon is now also available in the
"Printers..." folder displayed a share listing. The APW
allows for printers to be add remotely to a Samba or Windows
NT/2000 print server.
For a Samba host this means that the printer must be
physically added to the underlying printing system.
The addprinter command
defines a script to be run which
will perform the necessary operations for adding the printer
to the print system and to add the appropriate service definition
to the smb.conf file in order that it can be
shared by smbd
8.
The addprinter command is
automatically invoked with the following parameter (in
order):
printer name
share name
port name
driver name
location
Windows 9x driver location
All parameters are filled in from the PRINTER_INFO_2 structure sent
by the Windows NT/2000 client with one exception. The "Windows 9x
driver location" parameter is included for backwards compatibility
only. The remaining fields in the structure are generated from answers
to the APW questions.
Once the addprinter command has
been executed, smbd will reparse the
smb.conf to determine if the share defined by the APW
exists. If the sharename is still invalid, then smbd
will return an ACCESS_DENIED error to the client.
The addprinter command program
can output a single line of text,
which Samba will set as the port the new printer is connected to.
If this line isn't output, Samba won't reload its printer shares.
deleteprinter command
printing
show add printer wizard
/usr/bin/addprinter