[Samba] No joy adding a CUPS printer
Gary Thomas
gary at chez-thomas.org
Thu Dec 11 00:09:26 GMT 2003
I'm trying to change my Samba setup from LPD to CUPS, with little
success. I've followed [and re-followed] the setup documentation
from CUPS and I just can't get Samba to recognize my printer.
The catch is - it sort of recognizes it :-(
First I added these lines to my smb.conf:
=========================================
[global]
load printers = yes
printing = cups
printcap name = cups
[printers]
comment = All Printers
path = /var/spool/samba
print ok = Yes
browseable = No
printer admin = root
[print$]
comment = Printer Drivers
path = /etc/samba/drivers
browseable = yes
guest ok = no
read only = yes
write list = root
I fetched and installed all of the various driver files into the CUPS
driver directory:
=====================================================================
[root samba]# ls -l /usr/share/cups/drivers/
total 5704
-rwxr--r-- 1 root root 575573 Dec 10 16:11 ADFONTS.MFM
-rwxr--r-- 1 root root 1295840 Dec 10 16:07 ADOBEPS4.DRV
-rwxr--r-- 1 root root 196460 Dec 10 16:07 ADOBEPS4.HLP
-rwxr--r-- 1 root root 457600 Dec 10 16:09 ADOBEPS5.DLL
-rwxr--r-- 1 root root 135680 Dec 10 16:09 ADOBEPSU.DLL
-rwxr--r-- 1 root root 18451 Dec 10 16:07 ADOBEPSU.HLP
-r--r--r-- 1 root root 14234 Sep 24 2002 cups5.hlp
-r--r--r-- 1 root root 280364 Dec 1 14:53 cupsdrv5.dll
-r--r--r-- 1 root root 219540 Dec 1 14:53 cupsui5.dll
-rwxr--r-- 1 guest guest 13492 Mar 9 2000 DEFPRTR2.PPD
-rwxr--r-- 1 root root 118128 Dec 10 16:10 ICONLIB.DLL
-rwxr--r-- 1 guest guest 129024 Aug 17 2001 PS5UI.DLL
-rwxr--r-- 1 guest guest 455168 Aug 17 2001 PSCRIPT5.DLL
-rwxr--r-- 1 guest guest 26038 Jul 21 2001 PSCRIPT.HLP
-rwxr--r-- 1 guest guest 792644 Jul 21 2001 PSCRIPT.NTF
-rwxr--r-- 1 guest guest 969400 Jul 21 2001 PSCRPTFE.NTF
-rwxr--r-- 1 root root 57344 Dec 10 16:10 PSMON.DLL
Then I ran 'cupsaddsmb' in verbose mode:
========================================
[root samba]# cupsaddsmb -v -U root -a
Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%xxxx' -c 'mkdir W32X86;put /var/spool/cups/tmp/3fd7b39ff37ad W32X86/lp.PPD;put /usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
added interface ip=63.225.98.241 bcast=63.225.98.247 nmask=255.255.255.248
added interface ip=192.168.1.101 bcast=192.168.1.255 nmask=255.255.255.0
Domain=[MYGROUP] OS=[Unix] Server=[Samba 2.2.7a]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
putting file /var/spool/cups/tmp/3fd7b39ff37ad as \W32X86/lp.PPD (19141.7 kb/s) (average 19143.6 kb/s)
putting file /usr/share/cups/drivers/ADOBEPS5.DLL as \W32X86/ADOBEPS5.DLL (44687.1 kb/s) (average 42365.3 kb/s)
putting file /usr/share/cups/drivers/ADOBEPSU.DLL as \W32X86/ADOBEPSU.DLL (44165.2 kb/s) (average 42751.3 kb/s)
putting file /usr/share/cups/drivers/ADOBEPSU.HLP as \W32X86/ADOBEPSU.HLP (18016.8 kb/s) (average 41102.5 kb/s)
Running command: rpcclient localhost -N -U'root%xxxx' -c 'adddriver "Windows NT x86" "lp:ADOBEPS5.DLL:lp.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"'
cmd = adddriver "Windows NT x86" "lp:ADOBEPS5.DLL:lp.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"
Printer Driver lp successfully installed.
Running command: smbclient //localhost/print\$ -N -U'root%xxxx' -c 'mkdir WIN40;put /var/spool/cups/tmp/3fd7b39ff37ad WIN40/lp.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/DEFPRTR2.PPD WIN40/DEFPRTR2.PPD;put /usr/share/cups/drivers/ICONLIB.DLL WIN40/ICONLIB.DLL;put /usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;'
added interface ip=63.225.98.241 bcast=63.225.98.247 nmask=255.255.255.248
added interface ip=192.168.1.101 bcast=192.168.1.255 nmask=255.255.255.0
Domain=[MYGROUP] OS=[Unix] Server=[Samba 2.2.7a]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40
putting file /var/spool/cups/tmp/3fd7b39ff37ad as \WIN40/lp.PPD (19141.7 kb/s) (average 19143.6 kb/s)
putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM (46839.9 kb/s) (average 44709.7 kb/s)
putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV (46869.0 kb/s) (average 46167.4 kb/s)
putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP (47962.7 kb/s) (average 46330.7 kb/s)
putting file /usr/share/cups/drivers/DEFPRTR2.PPD as \WIN40/DEFPRTR2.PPD (134920000.0 kb/s) (average 46630.1 kb/s)
putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL (23071.4 kb/s) (average 44226.2 kb/s)
putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL (55994.5 kb/s) (average 44461.7 kb/s)
Running command: rpcclient localhost -N -U'root%xxxx' -c 'adddriver "Windows 4.0" "lp:ADOBEPS4.DRV:lp.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV:lp.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'
cmd = adddriver "Windows 4.0" "lp:ADOBEPS4.DRV:lp.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV:lp.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"
Printer Driver lp successfully installed.
Running command: rpcclient localhost -N -U'root%xxxx' -c 'setdriver lp lp'
cmd = setdriver lp lp
Succesfully set lp to driver lp.
Now, testing that things went well (the above indicates it did):
================================================================
[root samba]# rpcclient localhost -Uroot%xxxx -c 'enumprinters'
cmd = enumprinters
flags:[0x800000]
name:[\\localhost\lp]
description:[\\localhost\lp,lp,HP OfficeJet 6110 Foomatic/hpijs (recommended)]
comment:[HP OfficeJet 6110 Foomatic/hpijs (recommended)]
[root samba]# rpcclient localhost -Uroot%xxxx -c 'getprinter lp 2'
cmd = getprinter lp 2
servername:[\\localhost]
printername:[\\localhost\lp]
sharename:[lp]
portname:[Samba Printer Port]
drivername:[lp]
comment:[HP OfficeJet 6110 Foomatic/hpijs (recommended)]
location:[]
sepfile:[]
printprocessor:[winprint]
datatype:[RAW]
parameters:[]
attributes:[0x18]
priority:[0x1]
defaultpriority:[0x1]
starttime:[0x0]
untiltime:[0x0]
status:[0x0]
cjobs:[0x0]
averageppm:[0x0]
[root samba]# rpcclient localhost -Uroot%xxxx -c 'getdriver lp'
cmd = getdriver lp
Error opening printer handle for lp!
result was NT_STATUS_UNSUCCESSFUL
Alas, I'm stuck :-( Windows (XP Home if it matters) stalls trying to
install this printer, telling me I don't have the proper drivers
installed. Most likely because of the 'getdriver' issue above.
I'm running Samba 2.2.7a-7.9.0 - stock from Red Hat 9.0
Any ideas or help would be appreciated. My wife really wants her
printer back :-)
Thanks
--
Gary Thomas <gary at chez-thomas.org>
More information about the samba
mailing list