Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Samba HowTo Guide
Prev Home Next

Supporting Large Numbers of Printers

One issue that has arisen during the recent development phase of Samba is the need to support driver downloads for hundreds of printers. Using Windows NT APW for this task is somewhat awkward (to say the least). If you do not want to acquire RSS pains from the printer installation clicking orgy alone, you need to think about a non-interactive script.

If more than one printer is using the same driver, the rpcclient setdriver command can be used to set the driver associated with an installed queue. If the driver is uploaded to [print$] once and registered with the printing TDBs, it can be used by multiple print queues. In this case, you just need to repeat the setprinter subcommand of rpcclient for every queue (without the need to conduct the adddriver repeatedly). The following is an example of how this can be accomplished:

root# 

rpcclient 
SAMBA-CUPS
 -U root%
secret
 -c 'enumdrivers'

 cmd = enumdrivers
 
 [Windows NT x86]
 Printer Driver Info 1:
   Driver Name: [infotec  IS 2075 PCL 6]
 
 Printer Driver Info 1:
   Driver Name: [DANKA InfoStream]
 
 Printer Driver Info 1:
   Driver Name: [Heidelberg Digimaster 9110 (PS)]
 
 Printer Driver Info 1:
   Driver Name: [dm9110]

 Printer Driver Info 1:
   Driver Name: [mydrivername]

 [....]

root# 

rpcclient 
SAMBA-CUPS
 -U root%
secret
 -c 'enumprinters'

 cmd = enumprinters
   flags:[0x800000]
   name:[\\SAMBA-CUPS\dm9110]
   description:[\\SAMBA-CUPS\dm9110,,110ppm HiVolume DANKA Stuttgart]
   comment:[110 ppm HiVolume DANKA Stuttgart]
 [....]

root# 

rpcclient 
SAMBA-CUPS
 -U root%
secret
 -c \
  'setdriver 
dm9110
 "
Heidelberg Digimaster 9110 (PS)
"'

 cmd = setdriver dm9110 Heidelberg Digimaster 9110 (PPD)
 Successfully set dm9110 to driver Heidelberg Digimaster 9110 (PS).

root# 

rpcclient 
SAMBA-CUPS
 -U root%
secret
 -c 'enumprinters'

 cmd = enumprinters
   flags:[0x800000]
   name:[\\SAMBA-CUPS\dm9110]
   description:[\\SAMBA-CUPS\dm9110,Heidelberg Digimaster 9110 (PS),\
     110ppm HiVolume DANKA Stuttgart]
   comment:[110ppm HiVolume DANKA Stuttgart]
 [....]

root# 

rpcclient 
SAMBA-CUPS
 -U root%
secret
 -c 'setdriver 
dm9110
 
mydrivername
'

 cmd = setdriver dm9110 mydrivername
 Successfully set dm9110 to mydrivername.

root# 

rpcclient 
SAMBA-CUPS
 -U root%
secret
 -c 'enumprinters'

 cmd = enumprinters
   flags:[0x800000]
   name:[\\SAMBA-CUPS\dm9110]
   description:[\\SAMBA-CUPS\dm9110,mydrivername,\
     110ppm HiVolume DANKA Stuttgart]
   comment:[110ppm HiVolume DANKA Stuttgart]
 [....]

It may not be easy to recognize that the first call to enumprinters showed the “dm9110” printer with an empty string where the driver should have been listed (between the two commas in the description field). After the setdriver command succeeds, all is well.

Samba HowTo Guide
Prev Home Next

 
 
  Published under the terms fo the GNU General Public License Design by Interspire