cupsaddsmb: How to add cups printers to samba

There is many ways to add cups printers to samba and for a long time I used the “common” solution:

  1. Add the printer to cups either
    • through the interface
    • or by editing the /etc/cups/printers.conf file and manually adding the ppd into the /etc/cups/ppd directory (e.g: if declared <Printer HP_Laserjet_6MP> then the ppd filename is HP_Laserjet_6MP.ppd)
  2. Then with a Microsoft machine,
    1. go to the printer share
    2. right click in the folder and select Server Properties
    3. go in the drivers tab and click the Add… button in order to add the windows driver in the server. This driver will be uploaded in the samba print$ share (e.g. the /var/spool/cups/drivers directory) under the W32X86/3 sub-directory.

But this solution implies one driver for linux and another one for windows. This lead to driver version problems and others. So there is another solution based on the cupsaddsmb tool provided by the debian cups-client package.

This website provides a good explanation to start:

together with both cups man pages:

and finally with the Windows Driver

For me there was two major points:

  1. Testing both the original ppd (provided by the manufacturer) found under the /etc/cups/ppd directory and the one generated by cupsaddsmb found under the /var/spool/cups/drivers/W32X86/3 directory.
  2. Setting the driver owner/rights in the samba print$ share (/var/spool/cups/drivers/W32X86/3) which is usually root:lp and 644

:!: Each time you call the cupsaddsmb tool, the windows ppd file in the /var/spool/cups/drivers/W32X86/3 directory is modified!

Finally a short word about a problem while printing pdf through Adobe Acrobat Reader causing an OFFENDING COMMAND: findresource error.
There is a workaround which is clearly described by Michael D. Valentine in the post entitled Acrobat to Samba to CUPS to Papercut to Lexmark...What could possibly go wrong?.
The solution is to add a key (“bOptimizePSForSpeed”=dword:00000000) in the registry under the HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\8.0\Originals section.
This will preset adobe acrobat for sending Font and Resource Policy with the Send for Each Page option.
This option is usually found in the Advanced tab of the adobe acrobat Print window .

TESTS

test_1

Administrator@siro:/usr/share/cups# ls -l drivers/
total 2112
-rw-r--r-- 1 root root    803 2009-11-09 20:15 cups6.inf
-rw-r--r-- 1 root root     72 2009-11-09 20:15 cups6.ini
-rwxr--r-- 1 root root   9529 2009-10-22 05:52 cups6.ppd
-rw-r--r-- 1 root root  12568 2009-11-09 20:15 cupsps6.dll
-rw-r--r-- 1 root root  13672 2009-11-09 20:15 cupsui6.dll
-rwxr--r-- 1 root root 728576 2009-10-22 05:52 ps5ui.dll
-rwxr--r-- 1 root root 543232 2009-10-22 05:52 pscript5.dll
-rwxr--r-- 1 root root  26038 2009-10-22 05:52 pscript.hlp
-rwxr--r-- 1 root root 792644 2009-10-22 05:52 pscript.ntf
Administrator@siro:/usr/share/cups# cupsaddsmb -v -H siro.irovision.ch -U administrator Xerox_Test
Password for administrator required to access siro.irovision.ch via SAMBA: 
Running command: smbclient //siro.irovision.ch/print$ -N -A /tmp/4af9813d21941 -c 'mkdir W32X86;put /tmp/4af9813a0bf69 W32X86/Xerox_Test.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'
Domain=[IROVISION] OS=[Unix] Server=[Samba 3.2.5]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
putting file /tmp/4af9813a0bf69 as \W32X86/Xerox_Test.ppd (7288.3 kb/s) (average 7288.4 kb/s)
putting file /usr/share/cups/drivers/ps5ui.dll as \W32X86/ps5ui.dll (14822.9 kb/s) (average 13523.9 kb/s)
putting file /usr/share/cups/drivers/pscript.hlp as \W32X86/pscript.hlp (260380000.0 kb/s) (average 13962.3 kb/s)
putting file /usr/share/cups/drivers/pscript.ntf as \W32X86/pscript.ntf (16126.4 kb/s) (average 14942.2 kb/s)
putting file /usr/share/cups/drivers/pscript5.dll as \W32X86/pscript5.dll (44208.0 kb/s) (average 17918.5 kb/s)
 
Running command: smbclient //siro.irovision.ch/print$ -N -A /tmp/4af9813d21941 -c 'put /usr/share/cups/drivers/cups6.ini W32X86/cups6.ini;put /usr/share/cups/drivers/cupsps6.dll W32X86/cupsps6.dll;put /usr/share/cups/drivers/cupsui6.dll W32X86/cupsui6.dll'
Domain=[IROVISION] OS=[Unix] Server=[Samba 3.2.5]
putting file /usr/share/cups/drivers/cups6.ini as \W32X86/cups6.ini (720000.0 kb/s) (average inf kb/s)
putting file /usr/share/cups/drivers/cupsps6.dll as \W32X86/cupsps6.dll (125680000.0 kb/s) (average inf kb/s)
putting file /usr/share/cups/drivers/cupsui6.dll as \W32X86/cupsui6.dll (136720000.0 kb/s) (average inf kb/s)
 
Running command: rpcclient siro.irovision.ch -N -A /tmp/4af9813d21941 -c 'adddriver "Windows NT x86" "Xerox_Test:pscript5.dll:Xerox_Test.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:pscript5.dll,Xerox_Test.ppd,ps5ui.dll,pscript.hlp,pscript.ntf,cups6.ini,cupsps6.dll,cupsui6.dll"'
Printer Driver Xerox_Test successfully installed.
 
Running command: rpcclient siro.irovision.ch -N -A /tmp/4af9813d21941 -c 'setdriver Xerox_Test Xerox_Test'
Successfully set Xerox_Test to driver Xerox_Test.

test_2

Administrator@siro:/usr/share/cups# ls -l drivers/
total 5208
-rwxr--r-- 1 root root  575573 2009-11-10 10:56 adfonts.mfm
-rwxr--r-- 1 root root 1295840 2009-11-10 10:56 adobeps4.drv
-rwxr--r-- 1 root root  196460 2009-11-10 10:56 adobeps4.hlp
-rwxr--r-- 1 root root  457600 2009-11-10 10:56 adobeps5.dll
-rwxr--r-- 1 root root  135680 2009-11-10 10:56 adobepsu.dll
-rwxr--r-- 1 root root   18451 2009-11-10 10:56 adobepsu.hlp
-rwxr--r-- 1 root root   13492 2009-11-10 10:56 defprtr2.ppd
-rwxr--r-- 1 root root  118128 2009-11-10 10:56 iconlib.dll
-rwxr-x--- 1 root root  135248 2009-11-10 10:56 ps5ui.dll
-rwxr-x--- 1 root root  470608 2009-11-10 10:56 pscript5.dll
-rwxr-x--- 1 root root   26056 2009-11-10 10:56 pscript.hlp
-rwxr-x--- 1 root root  792644 2009-11-10 10:56 pscript.ntf
-rwxr-x--- 1 root root  969400 2009-11-10 10:56 pscrptfe.ntf
-rwxr--r-- 1 root root   57344 2009-11-10 10:56 psmon.dll
Administrator@siro:/usr/share/cups# cupsaddsmb -v -H siro.irovision.ch -U administrator HL_5250DN
Password for administrator required to access siro.irovision.ch via SAMBA: 
Running command: smbclient //siro.irovision.ch/print$ -N -A /tmp/4af985e21ef53 -c 'mkdir W32X86;put /tmp/4af985df50d2c W32X86/HL_5250DN.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'
Domain=[IROVISION] OS=[Unix] Server=[Samba 3.2.5]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
putting file /tmp/4af985df50d2c as \W32X86/HL_5250DN.ppd (245520000.0 kb/s) (average inf kb/s)
putting file /usr/share/cups/drivers/ps5ui.dll as \W32X86/ps5ui.dll (3301.9 kb/s) (average 3901.4 kb/s)
putting file /usr/share/cups/drivers/pscript.hlp as \W32X86/pscript.hlp (1339.2 kb/s) (average 3076.3 kb/s)
putting file /usr/share/cups/drivers/pscript.ntf as \W32X86/pscript.ntf (16469.5 kb/s) (average 9014.8 kb/s)
putting file /usr/share/cups/drivers/pscript5.dll as \W32X86/pscript5.dll (20889.8 kb/s) (average 11055.8 kb/s)
 
Running command: rpcclient siro.irovision.ch -N -A /tmp/4af985e21ef53 -c 'adddriver "Windows NT x86" "HL_5250DN:pscript5.dll:HL_5250DN.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:pscript5.dll,HL_5250DN.ppd,ps5ui.dll,pscript.hlp,pscript.ntf"'
Printer Driver HL_5250DN successfully installed.
 
Running command: rpcclient siro.irovision.ch -N -A /tmp/4af985e21ef53 -c 'setdriver HL_5250DN HL_5250DN'
Successfully set HL_5250DN to driver HL_5250DN.

test_3

root@siro:/usr/share/cups# ls -l drivers/
total 5260
-rwxr--r-- 1 root root  575573 2009-11-10 10:56 adfonts.mfm
-rwxr--r-- 1 root root 1295840 2009-11-10 10:56 adobeps4.drv
-rwxr--r-- 1 root root  196460 2009-11-10 10:56 adobeps4.hlp
-rwxr--r-- 1 root root  457600 2009-11-10 10:56 adobeps5.dll
-rwxr--r-- 1 root root  135680 2009-11-10 10:56 adobepsu.dll
-rwxr--r-- 1 root root   18451 2009-11-10 10:56 adobepsu.hlp
-rw-r--r-- 1 root root     803 2009-11-11 09:11 cups6.inf
-rw-r--r-- 1 root root      72 2009-11-11 09:11 cups6.ini
-rwxr--r-- 1 root root    9529 2009-11-11 09:11 cups6.ppd
-rw-r--r-- 1 root root   12568 2009-11-11 09:11 cupsps6.dll
-rw-r--r-- 1 root root   13672 2009-11-11 09:11 cupsui6.dll
-rwxr--r-- 1 root root   13492 2009-11-10 10:56 defprtr2.ppd
-rwxr--r-- 1 root root  118128 2009-11-10 10:56 iconlib.dll
-rwxr-x--- 1 root root  135248 2009-11-10 10:56 ps5ui.dll
-rwxr-x--- 1 root root  470608 2009-11-10 10:56 pscript5.dll
-rwxr-x--- 1 root root   26056 2009-11-10 10:56 pscript.hlp
-rwxr-x--- 1 root root  792644 2009-11-10 10:56 pscript.ntf
-rwxr-x--- 1 root root  969400 2009-11-10 10:56 pscrptfe.ntf
-rwxr--r-- 1 root root   57344 2009-11-10 10:56 psmon.dll
root@siro:/usr/share/cups# cupsaddsmb -v -H siro.irovision.ch -U administrator HL_5250DN
Password for administrator required to access siro.irovision.ch via SAMBA: 
Running command: smbclient //siro.irovision.ch/print$ -N -A /tmp/4afa7257af653 -c 'mkdir W32X86;put /tmp/4afa725499e87 W32X86/HL_5250DN.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'
Domain=[IROVISION] OS=[Unix] Server=[Samba 3.2.5]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
putting file /tmp/4afa725499e87 as \W32X86/HL_5250DN.ppd (245520000.0 kb/s) (average inf kb/s)
putting file /usr/share/cups/drivers/ps5ui.dll as \W32X86/ps5ui.dll (26415.1 kb/s) (average 31210.9 kb/s)
putting file /usr/share/cups/drivers/pscript.hlp as \W32X86/pscript.hlp (260560000.0 kb/s) (average 36300.0 kb/s)
putting file /usr/share/cups/drivers/pscript.ntf as \W32X86/pscript.ntf (64505.0 kb/s) (average 56209.8 kb/s)
putting file /usr/share/cups/drivers/pscript5.dll as \W32X86/pscript5.dll (76595.1 kb/s) (average 61528.0 kb/s)
 
Running command: smbclient //siro.irovision.ch/print$ -N -A /tmp/4afa7257af653 -c 'put /usr/share/cups/drivers/cups6.ini W32X86/cups6.ini;put /usr/share/cups/drivers/cupsps6.dll W32X86/cupsps6.dll;put /usr/share/cups/drivers/cupsui6.dll W32X86/cupsui6.dll'
Domain=[IROVISION] OS=[Unix] Server=[Samba 3.2.5]
putting file /usr/share/cups/drivers/cups6.ini as \W32X86/cups6.ini (720000.0 kb/s) (average inf kb/s)
putting file /usr/share/cups/drivers/cupsps6.dll as \W32X86/cupsps6.dll (125680000.0 kb/s) (average inf kb/s)
putting file /usr/share/cups/drivers/cupsui6.dll as \W32X86/cupsui6.dll (136720000.0 kb/s) (average inf kb/s)
 
Running command: rpcclient siro.irovision.ch -N -A /tmp/4afa7257af653 -c 'adddriver "Windows NT x86" "HL_5250DN:pscript5.dll:HL_5250DN.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:pscript5.dll,HL_5250DN.ppd,ps5ui.dll,pscript.hlp,pscript.ntf,cups6.ini,cupsps6.dll,cupsui6.dll"'
Printer Driver HL_5250DN successfully installed.
 
Running command: rpcclient siro.irovision.ch -N -A /tmp/4afa7257af653 -c 'setdriver HL_5250DN HL_5250DN'
Successfully set HL_5250DN to driver HL_5250DN.

test_4

root@siro:/usr/share/cups# ls -la drivers/
total 5216
drwxr-xr-x  2 root root    4096 2009-11-10 11:02 .
drwxr-xr-x 16 root root    4096 2009-11-11 09:19 ..
-rwxr--r--  1 root root  575573 2009-11-10 10:56 ADFONTS.MFM
-rwxr--r--  1 root root 1295840 2009-11-10 10:56 ADOBEPS4.DRV
-rwxr--r--  1 root root  196460 2009-11-10 10:56 ADOBEPS4.HLP
-rwxr--r--  1 root root  457600 2009-11-10 10:56 ADOBEPS5.DLL
-rwxr--r--  1 root root  135680 2009-11-10 10:56 ADOBEPSU.DLL
-rwxr--r--  1 root root   18451 2009-11-10 10:56 ADOBEPSU.HLP
-rwxr--r--  1 root root   13492 2009-11-10 10:56 DEFPRTR2.PPD
-rwxr--r--  1 root root  118128 2009-11-10 10:56 ICONLIB.DLL
-rwxr-x---  1 root root  135248 2009-11-10 10:56 PS5UI.DLL
-rwxr-x---  1 root root  470608 2009-11-10 10:56 PSCRIPT5.DLL
-rwxr-x---  1 root root   26056 2009-11-10 10:56 PSCRIPT.HLP
-rwxr-x---  1 root root  792644 2009-11-10 10:56 PSCRIPT.NTF
-rwxr-x---  1 root root  969400 2009-11-10 10:56 PSCRPTFE.NTF
-rwxr--r--  1 root root   57344 2009-11-10 10:56 PSMON.DLL
root@siro:/usr/share/cups# cupsaddsmb -v -H siro.irovision.ch -U administrator HL_5250DN
Password for administrator required to access siro.irovision.ch via SAMBA: 
Running command: smbclient //siro.irovision.ch/print$ -N -A /tmp/4afa7414ba917 -c 'mkdir WIN40;put /tmp/4afa74119f5f1 WIN40/HL_5250DN.PPD;put /usr/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM;put /usr/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV;put /usr/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP;put /usr/share/cups/drivers/ICONLIB.DLL WIN40/ICONLIB.DLL;put /usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;'
Domain=[IROVISION] OS=[Unix] Server=[Samba 3.2.5]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40
putting file /tmp/4afa74119f5f1 as \WIN40/HL_5250DN.PPD (2397.6 kb/s) (average 2397.7 kb/s)
putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM (10809.3 kb/s) (average 9452.6 kb/s)
putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV (36156.1 kb/s) (average 19087.9 kb/s)
putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP (31975.4 kb/s) (average 19838.7 kb/s)
putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL (12817.6 kb/s) (average 19274.5 kb/s)
putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL (4666.6 kb/s) (average 17860.8 kb/s)
 
Running command: rpcclient siro.irovision.ch -N -A /tmp/4afa7414ba917 -c 'adddriver "Windows 4.0" "HL_5250DN:ADOBEPS4.DRV:HL_5250DN.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,HL_5250DN.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,ICONLIB.DLL"'
Printer Driver HL_5250DN successfully installed.
 
Warning, no Windows 2000 printer drivers are installed!
Running command: rpcclient siro.irovision.ch -N -A /tmp/4afa7414ba917 -c 'setdriver HL_5250DN HL_5250DN'
Successfully set HL_5250DN to driver HL_5250DN.

test_5

root@siro:/usr/share/cups# ls -la drivers/
total 5268
drwxr-xr-x  2 root root    4096 2009-11-11 09:30 .
drwxr-xr-x 17 root root    4096 2009-11-11 09:30 ..
-rwxr--r--  1 root root  575573 2009-11-10 10:56 ADFONTS.MFM
-rwxr--r--  1 root root 1295840 2009-11-10 10:56 ADOBEPS4.DRV
-rwxr--r--  1 root root  196460 2009-11-10 10:56 ADOBEPS4.HLP
-rwxr--r--  1 root root  457600 2009-11-10 10:56 ADOBEPS5.DLL
-rwxr--r--  1 root root  135680 2009-11-10 10:56 ADOBEPSU.DLL
-rwxr--r--  1 root root   18451 2009-11-10 10:56 ADOBEPSU.HLP
-rw-r--r--  1 root root     803 2009-11-11 09:30 cups6.inf
-rw-r--r--  1 root root      72 2009-11-11 09:30 cups6.ini
-rwxr--r--  1 root root    9529 2009-11-11 09:30 cups6.ppd
-rw-r--r--  1 root root   12568 2009-11-11 09:30 cupsps6.dll
-rw-r--r--  1 root root   13672 2009-11-11 09:30 cupsui6.dll
-rwxr--r--  1 root root   13492 2009-11-10 10:56 DEFPRTR2.PPD
-rwxr--r--  1 root root  118128 2009-11-10 10:56 ICONLIB.DLL
-rwxr-x---  1 root root  135248 2009-11-10 10:56 PS5UI.DLL
-rwxr-x---  1 root root  470608 2009-11-10 10:56 PSCRIPT5.DLL
-rwxr-x---  1 root root   26056 2009-11-10 10:56 PSCRIPT.HLP
-rwxr-x---  1 root root  792644 2009-11-10 10:56 PSCRIPT.NTF
-rwxr-x---  1 root root  969400 2009-11-10 10:56 PSCRPTFE.NTF
-rwxr--r--  1 root root   57344 2009-11-10 10:56 PSMON.DLL
root@siro:/usr/share/cups# cupsaddsmb -v -H siro.irovision.ch -U administrator HL_5250DN
Password for administrator required to access siro.irovision.ch via SAMBA: 
Running command: smbclient //siro.irovision.ch/print$ -N -A /tmp/4afa76a152b06 -c 'mkdir WIN40;put /tmp/4afa769e76303 WIN40/HL_5250DN.PPD;put /usr/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM;put /usr/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV;put /usr/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP;put /usr/share/cups/drivers/ICONLIB.DLL WIN40/ICONLIB.DLL;put /usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;'
Domain=[IROVISION] OS=[Unix] Server=[Samba 3.2.5]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40
putting file /tmp/4afa769e76303 as \WIN40/HL_5250DN.PPD (245520000.0 kb/s) (average inf kb/s)
putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM (93679.0 kb/s) (average 97676.6 kb/s)
putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV (105454.9 kb/s) (average 102862.7 kb/s)
putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP (95923.1 kb/s) (average 102169.2 kb/s)
putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL (115348.1 kb/s) (average 102797.3 kb/s)
putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL (573440000.0 kb/s) (average 105464.0 kb/s)
 
Running command: rpcclient siro.irovision.ch -N -A /tmp/4afa76a152b06 -c 'adddriver "Windows 4.0" "HL_5250DN:ADOBEPS4.DRV:HL_5250DN.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,HL_5250DN.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,ICONLIB.DLL"'
Printer Driver HL_5250DN successfully installed.
 
Warning, no Windows 2000 printer drivers are installed!
Running command: rpcclient siro.irovision.ch -N -A /tmp/4afa76a152b06 -c 'setdriver HL_5250DN HL_5250DN'
Successfully set HL_5250DN to driver HL_5250DN.

cupstestppd

root@siro:/usr/share/cups# cupstestppd /mnt/oldsiro/etc/cups/ppd/HL-5250DN.ppd 
/mnt/oldsiro/etc/cups/ppd/HL-5250DN.ppd: FAIL
      **FAIL**  Missing option BRCollate in UIConstraint "*BRCollate True *Option100 False"!
      **FAIL**  Missing option Option100 in UIConstraint "*BRCollate True *Option100 False"!
      **FAIL**  Missing option Option100 in UIConstraint "*Option100 False *BRCollate True"!
      **FAIL**  Missing option BRCollate in UIConstraint "*Option100 False *BRCollate True"!
      **FAIL**  Missing option Resolution in UIConstraint "*Resolution 1200dpi *Smoothing Dark"!
      **FAIL**  Missing option Smoothing in UIConstraint "*Resolution 1200dpi *Smoothing Dark"!
      **FAIL**  Missing option Resolution in UIConstraint "*Resolution 1200dpi *Smoothing Light"!
      **FAIL**  Missing option Smoothing in UIConstraint "*Resolution 1200dpi *Smoothing Light"!
      **FAIL**  Missing option Resolution in UIConstraint "*Resolution 1200dpi *Smoothing Medium"!
      **FAIL**  Missing option Smoothing in UIConstraint "*Resolution 1200dpi *Smoothing Medium"!
      **FAIL**  Missing option Resolution in UIConstraint "*Resolution 1200dpi *TonerSaveMode On"!
      **FAIL**  Missing option Smoothing in UIConstraint "*Smoothing Dark *Resolution 1200dpi"!
      **FAIL**  Missing option Resolution in UIConstraint "*Smoothing Dark *Resolution 1200dpi"!
      **FAIL**  Missing option Smoothing in UIConstraint "*Smoothing Light *Resolution 1200dpi"!
      **FAIL**  Missing option Resolution in UIConstraint "*Smoothing Light *Resolution 1200dpi"!
      **FAIL**  Missing option Smoothing in UIConstraint "*Smoothing Medium *Resolution 1200dpi"!
      **FAIL**  Missing option Resolution in UIConstraint "*Smoothing Medium *Resolution 1200dpi"!
      **FAIL**  Missing option Resolution in UIConstraint "*TonerSaveMode On *Resolution 1200dpi"!
        WARN    DefaultOutputBin has no corresponding options!
        WARN    Protocols contains PJL but JCL attributes are not set.
                REF: Pages 78-79, section 5.7.

So go on http://www.openprinting.org/printer_list.cgi and download a good ppd which is written by competent people!!!

root@siro:/tmp# wget http://www.linuxprinting.org/foomatic-db/db/source/PPD/Brother/BR5250_2_GPL.ppd
--2009-11-11 09:41:58--  http://www.linuxprinting.org/foomatic-db/db/source/PPD/Brother/BR5250_2_GPL.ppd
Resolving www.linuxprinting.org... 140.211.169.115
Connecting to www.linuxprinting.org|140.211.169.115|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22806 (22K) [text/plain]
Saving to: `BR5250_2_GPL.ppd'
 
100%[===========================================================================>] 22,806      50.8K/s   in 0.4s    
 
2009-11-11 09:41:59 (50.8 KB/s) - `BR5250_2_GPL.ppd' saved [22806/22806]
root@siro:/tmp# cupstestppd BR5250_2_GPL.ppd 
BR5250_2_GPL.ppd: PASS
        WARN    DefaultOutputBin has no corresponding options!

test_6

root@siro:/usr/share/cups# ls -la drivers/
total 5268
drwxr-xr-x  2 root root    4096 2009-11-11 09:11 .
drwxr-xr-x 17 root root    4096 2009-11-11 09:48 ..
-rwxr--r--  1 root root  575573 2009-11-10 10:56 adfonts.mfm
-rwxr--r--  1 root root 1295840 2009-11-10 10:56 adobeps4.drv
-rwxr--r--  1 root root  196460 2009-11-10 10:56 adobeps4.hlp
-rwxr--r--  1 root root  457600 2009-11-10 10:56 adobeps5.dll
-rwxr--r--  1 root root  135680 2009-11-10 10:56 adobepsu.dll
-rwxr--r--  1 root root   18451 2009-11-10 10:56 adobepsu.hlp
-rw-r--r--  1 root root     803 2009-11-11 09:11 cups6.inf
-rw-r--r--  1 root root      72 2009-11-11 09:11 cups6.ini
-rwxr--r--  1 root root    9529 2009-11-11 09:11 cups6.ppd
-rw-r--r--  1 root root   12568 2009-11-11 09:11 cupsps6.dll
-rw-r--r--  1 root root   13672 2009-11-11 09:11 cupsui6.dll
-rwxr--r--  1 root root   13492 2009-11-10 10:56 defprtr2.ppd
-rwxr--r--  1 root root  118128 2009-11-10 10:56 iconlib.dll
-rwxr-x---  1 root root  135248 2009-11-10 10:56 ps5ui.dll
-rwxr-x---  1 root root  470608 2009-11-10 10:56 pscript5.dll
-rwxr-x---  1 root root   26056 2009-11-10 10:56 pscript.hlp
-rwxr-x---  1 root root  792644 2009-11-10 10:56 pscript.ntf
-rwxr-x---  1 root root  969400 2009-11-10 10:56 pscrptfe.ntf
-rwxr--r--  1 root root   57344 2009-11-10 10:56 psmon.dll
root@siro:/usr/share/cups# cupsaddsmb -v -H siro.irovision.ch -U administrator HL_5250DN
Password for administrator required to access siro.irovision.ch via SAMBA: 
Running command: smbclient //siro.irovision.ch/print$ -N -A /tmp/4afa7ae158fa0 -c 'mkdir W32X86;put /tmp/4afa7adeb4539 W32X86/HL_5250DN.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'
Domain=[IROVISION] OS=[Unix] Server=[Samba 3.2.5]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
putting file /tmp/4afa7adeb4539 as \W32X86/HL_5250DN.ppd (251640000.0 kb/s) (average inf kb/s)
putting file /usr/share/cups/drivers/ps5ui.dll as \W32X86/ps5ui.dll (132065.2 kb/s) (average 156652.3 kb/s)
putting file /usr/share/cups/drivers/pscript.hlp as \W32X86/pscript.hlp (260560000.0 kb/s) (average 182097.7 kb/s)
putting file /usr/share/cups/drivers/pscript.ntf as \W32X86/pscript.ntf (96757.1 kb/s) (average 106240.5 kb/s)
putting file /usr/share/cups/drivers/pscript5.dll as \W32X86/pscript5.dll (91913.8 kb/s) (average 101124.4 kb/s)
 
Running command: smbclient //siro.irovision.ch/print$ -N -A /tmp/4afa7ae158fa0 -c 'put /usr/share/cups/drivers/cups6.ini W32X86/cups6.ini;put /usr/share/cups/drivers/cupsps6.dll W32X86/cupsps6.dll;put /usr/share/cups/drivers/cupsui6.dll W32X86/cupsui6.dll'
Domain=[IROVISION] OS=[Unix] Server=[Samba 3.2.5]
putting file /usr/share/cups/drivers/cups6.ini as \W32X86/cups6.ini (720000.0 kb/s) (average inf kb/s)
putting file /usr/share/cups/drivers/cupsps6.dll as \W32X86/cupsps6.dll (125680000.0 kb/s) (average inf kb/s)
putting file /usr/share/cups/drivers/cupsui6.dll as \W32X86/cupsui6.dll (136720000.0 kb/s) (average inf kb/s)
 
Running command: rpcclient siro.irovision.ch -N -A /tmp/4afa7ae158fa0 -c 'adddriver "Windows NT x86" "HL_5250DN:pscript5.dll:HL_5250DN.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:pscript5.dll,HL_5250DN.ppd,ps5ui.dll,pscript.hlp,pscript.ntf,cups6.ini,cupsps6.dll,cupsui6.dll"'
Printer Driver HL_5250DN successfully installed.
 
Running command: rpcclient siro.irovision.ch -N -A /tmp/4afa7ae158fa0 -c 'setdriver HL_5250DN HL_5250DN'
Successfully set HL_5250DN to driver HL_5250DN.
 
operating_systems/linux/debian/cupsaddsmb.txt · Last modified: 2009/11/11 12:24 by sbolay
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki