[Samba] Difficulty with Samba 2.2.8 and native CUPS PS drivers
David F. Severski
davidski-samba at deadheaven.com
Tue Apr 1 13:27:58 GMT 2003
Kurt,
Thanks for the detailed checklist. It, and your help, are very much
appreciated.
On Mon, Mar 31, 2003 at 07:49:58PM +0200, Kurt Pfeifle wrote:
> readers -- it may avoid some traffic in the future... ;-) But I can't see
> a mention of your OS, and the source of your CUPS and Samba installations.
> Self-compiled? Vendor-provided packages? )
The OS is FreeBSD 4.8-RC (STABLE) with CUPS, Samba, and all supporting
print packages (gimp-print, etc.) compiled from source via the FreeBSD ports
system. Samba was compiled with the recycle and SSL options, though neither
of those functions are currently used in my setup.
> And your "smbd" is linked against "libcups"? Check for
>
> "ldd `which smbd`| grep libcups"
Cups is linked, as show below:
davidski at geoff:~$ ldd `which smbd`
/usr/local/sbin/smbd:
libssl.so.3 => /usr/lib/libssl.so.3 (0x281bc000)
libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x281eb000)
libcups.so.2 => /usr/local/lib/libcups.so.2 (0x282e2000)
libpam.so.1 => /usr/lib/libpam.so.1 (0x282fb000)
libpopt.so.0 => /usr/local/lib/libpopt.so.0 (0x28305000)
libc.so.4 => /usr/lib/libc.so.4 (0x2830c000)
I've just completed a round of tests, with the full procedure and results
listed below. Since it's rather lengthy, I'll summarize here: Using the
CUPS PS driver, I cannot rectify the error where Windows claims the driver is
not installed. Also, enumprinters 3 causes a core dump in rpcclient, though
levels 2 and below complete.
Removing the CUPS drivers from both Samba and the Windows client, then
reinstalling the Adobe driver, allows Windows clients to connect, and print
properly.
The procedure and results are as follows:
Troubleshooting Steps
--------------------
1) Restarted FreeBSD (FreeBSD 4.8-RC) server.
2) Verified samba startup via /var/log/log.[smbd|nmbd] files and smbstatus
command
On Windows XP SP1 laptop:
3) Clicked on Canon_BJC
4) Deleted Canon_BJC printer
5) Right clicked to bring up server properties
6) Removed Canon_BJC driver
On Samba server:
7) Stopped samba
8) Moved ntprinters.tdb, ntdrivers.tdb, printing.tdb to /var/lock/old
subdirectory
9) Started samba
10) Verified startup via smbstatus
11) Ran rpcclient -U root localhost -c "enumprinters", this showed the
Canon_BJC printer. This was not expected.
12) Ran rm -rf /usr/local/samba/printers/*
13) Ran chmod 777 /usr/local/samba/printers/
14) Verified /usr/local/samba/printers directory was empty
15) Stoped and restarted samba
16) Verified startup via smbstatus
17) Ran cupsaddsmb -v -a
-----BEGIN OUTPUT-----
Running command: smbclient //localhost/print\$ -N -U'root%12345' -c 'mkdir W32X86;put /var/spool/cups/tmp/3e88f46f27177 W32X86/Canon_BJC.ppd;put /usr/local/share/cups/drivers/cupsdrvr.dll W32X86/cupsdrvr.dll;put /usr/local/share/cups/drivers/cupsui.dll W32X86/cupsui.dll;put /usr/local/share/cups/drivers/cups.hlp W32X86/cups.hlp'
added interface ip=192.168.0.1 bcast=192.168.0.255 nmask=255.255.255.0
Domain=[DEADHEAVEN] OS=[Unix] Server=[Samba 2.2.8]
putting file /var/spool/cups/tmp/3e88f46f27177 as \W32X86/Canon_BJC.ppd (11776.5 kb/s) (average 11776.7 kb/s)
putting file /usr/local/share/cups/drivers/cupsdrvr.dll as \W32X86/cupsdrvr.dll (4530.9 kb/s) (average 5566.0 kb/s)
putting file /usr/local/share/cups/drivers/cupsui.dll as \W32X86/cupsui.dll (5697.0 kb/s) (average 5611.3 kb/s)
putting file /usr/local/share/cups/drivers/cups.hlp as \W32X86/cups.hlp (926.7 kb/s) (average 5035.3 kb/s)
Running command: rpcclient localhost -N -U'root%12345' -c 'adddriver "Windows NT x86" "Canon_BJC:cupsdrvr.dll:Canon_BJC.ppd:cupsui.dll:cups.hlp:NULL:RAW:NULL"'
cmd = adddriver "Windows NT x86" "Canon_BJC:cupsdrvr.dll:Canon_BJC.ppd:cupsui.dll:cups.hlp:NULL:RAW:NULL"
Printer Driver Canon_BJC successfully installed.
Running command: rpcclient localhost -N -U'root%12345' -c 'setdriver Canon_BJC Canon_BJC'
cmd = setdriver Canon_BJC Canon_BJC
Succesfully set Canon_BJC to driver Canon_BJC.
-----END OUTPUT-----
18) Verified contents of print$ share:
-----BEGIN OUTPUT-----
root at geoff:/var/lock# ll /usr/local/samba/printers/W32X86/2/*
-rwxr--r-- 1 root wheel 120593 Mar 31 18:07 /usr/local/samba/printers/W32X86/2/Canon_BJC.ppd*
-rwxr--r-- 1 root wheel 14234 Mar 31 18:07 /usr/local/samba/printers/W32X86/2/cups.hlp*
-rwxr--r-- 1 root wheel 278380 Mar 31 18:07 /usr/local/samba/printers/W32X86/2/cupsdrvr.dll*
-rwxr--r-- 1 root wheel 215848 Mar 31 18:07 /usr/local/samba/printers/W32X86/2/cupsui.dll*
-----END OUTPUT-----
19) Verified checksums of CUPS drivers:
-----BEGIN OUTPUT-----
root at geoff:/var/lock# md5 /usr/local/samba/printers/W32X86/2/*
MD5 (/usr/local/samba/printers/W32X86/2/Canon_BJC.ppd) = 485b687f0ffa89c33a40ec5c2ea71bc8
MD5 (/usr/local/samba/printers/W32X86/2/cups.hlp) = c77f774c31001c56f6d358d71dcabff1
MD5 (/usr/local/samba/printers/W32X86/2/cupsdrvr.dll) = f07ba9266cf9588ff759da69b0f30c0c
MD5 (/usr/local/samba/printers/W32X86/2/cupsui.dll) = 3aaa29c514ed66761884548ba54c9aba
-----END OUTPUT-----
20) Stopped and restarted samba
21) Verified samba server statup via smbstatus
22) Re-ran rpcclient enumprinters command
-----BEGIN OUTPUT-----
root at geoff:/var/lock# rpcclient -U root localhost -c "enumdrivers"
Password:
cmd = enumdrivers
[Windows NT x86]
Printer Driver Info 1:
Driver Name: [Canon_BJC]
-----END OUTPUT-----
23) Ran enumprinters level 2:
-----BEGIN OUTPUT-----
root at geoff:/var/lock# rpcclient -U root localhost -c "enumdrivers 2"
Password:
cmd = enumdrivers 2
[Windows NT x86]
Printer Driver Info 2:
Version: [2]
Driver Name: [Canon_BJC]
Architecture: [Windows NT x86]
Driver Path: [\\localhost\print$\W32X86\2\cupsdrvr.dll]
Datafile: [\\localhost\print$\W32X86\2\Canon_BJC.ppd]
Configfile: [\\localhost\print$\W32X86\2\cupsui.dll]
-----END OUTPUT-----
24) Ran enumprinters level 3, this failed:
-----BEGIN OUTPUT-----
root at geoff:/var/lock# rpcclient -U root localhost -c "enumdrivers 3"
Password:
cmd = enumdrivers 3
[Windows NT x86]
Segmentation fault (core dumped)
-----END OUTPUT-----
On Windows XP SP1 laptop:
25) Browsed to samba server, right clicked on printer, choose connect
26) Received warning about installation of printer driver, answered YES to
continue.
27) Opened printers control panel
28) Opened new Canon_BJC
29) Went to Printer menu and choose properties
30) Received error message that driver is not installed
31) Moved cups drivers from /usr/local/share/cups/drivers to cupsdriver subdir
32) Copied Adobe drivers to /usr/local/share/cups/drivers
root at geoff:/usr/local/share/cups/drivers# ll
total 2962
drwxr-xr-x 4 root wheel 512 Apr 1 05:09 ./
drwxr-xr-x 9 root wheel 512 Mar 9 13:49 ../
-rwx--x--x 1 root wheel 575573 Apr 1 05:09 ADFONTS.MFM*
-rwx--x--x 1 root wheel 1278976 Apr 1 05:09 ADOBEPS4.DRV*
-rwx--x--x 1 root wheel 192772 Apr 1 05:09 ADOBEPS4.HLP*
-rwx--x--x 1 root wheel 434400 Apr 1 05:09 ADOBEPS5.DLL*
-rwx--x--x 1 root wheel 109568 Apr 1 05:09 ADOBEPSU.DLL*
-rwx--x--x 1 root wheel 18082 Apr 1 05:09 ADOBEPSU.HLP*
-rw-r--r-- 1 root wheel 120463 Mar 16 10:11 Canon_BJC.ppd
-rwx--x--x 1 root wheel 13492 Apr 1 05:09 DEFPRTR2.PPD*
-rwx--x--x 1 root wheel 13492 Apr 1 05:09 DEFPTR2.PPD*
-rwx--x--x 1 root wheel 118128 Apr 1 05:09 ICONLIB.DLL*
-rwx--x--x 1 root wheel 57344 Apr 1 05:09 PSMON.DLL*
drwx--x--x 2 root wheel 512 Apr 1 05:09 cupdriver/
drwx--x--x 2 root wheel 512 Mar 29 08:21 old/
33) Ran rm -rf /usr/local/samba/printers/*
34) Ran cupssmbadd
root at geoff:/usr/local/share/cups/drivers# cupsaddsmb -v -a
Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%12345' -c 'mkdir W32X86;put /var/spool/cups/tmp/3e899046b45df W32X86/Canon_BJC.PPD;put /usr/local/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/local/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put /usr/local/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
added interface ip=192.168.0.1 bcast=192.168.0.255 nmask=255.255.255.0
Domain=[DEADHEAVEN] OS=[Unix] Server=[Samba 2.2.8]
putting file /var/spool/cups/tmp/3e899046b45df as \W32X86/Canon_BJC.PPD (14720.6 kb/s) (average 14720.8 kb/s)
putting file /usr/local/share/cups/drivers/ADOBEPS5.DLL as \W32X86/ADOBEPS5.DLL (17675.7 kb/s) (average 16937.0 kb/s)
putting file /usr/local/share/cups/drivers/ADOBEPSU.DLL as \W32X86/ADOBEPSU.DLL (11888.8 kb/s) (average 15828.9 kb/s)
putting file /usr/local/share/cups/drivers/ADOBEPSU.HLP as \W32X86/ADOBEPSU.HLP (8828.7 kb/s) (average 15503.3 kb/s)
Running command: rpcclient localhost -N -U'root%12345' -c 'adddriver "Windows NT x86" "Canon_BJC:ADOBEPS5.DLL:Canon_BJC.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"'
cmd = adddriver "Windows NT x86" "Canon_BJC:ADOBEPS5.DLL:Canon_BJC.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"
Printer Driver Canon_BJC successfully installed.
Running command: smbclient //localhost/print\$ -N -U'root%12345' -c 'mkdir WIN40;put /var/spool/cups/tmp/3e899046b45df WIN40/Canon_BJC.PPD;put /usr/local/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM;put /usr/local/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV;put /usr/local/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP;put /usr/local/share/cups/drivers/DEFPRTR2.PPD WIN40/DEFPRTR2.PPD;put /usr/local/share/cups/drivers/ICONLIB.DLL WIN40/ICONLIB.DLL;put /usr/local/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;'
added interface ip=192.168.0.1 bcast=192.168.0.255 nmask=255.255.255.0
Domain=[DEADHEAVEN] OS=[Unix] Server=[Samba 2.2.8]
putting file /var/spool/cups/tmp/3e899046b45df as \WIN40/Canon_BJC.PPD (14720.6 kb/s) (average 14720.8 kb/s)
putting file /usr/local/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM (18131.7 kb/s) (average 17432.0 kb/s)
putting file /usr/local/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV (18367.6 kb/s) (average 18026.6 kb/s)
putting file /usr/local/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP (7530.1 kb/s) (average 16038.7 kb/s)
putting file /usr/local/share/cups/drivers/DEFPRTR2.PPD as \WIN40/DEFPRTR2.PPD (1464.0 kb/s) (average 15108.4 kb/s)
putting file /usr/local/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL (14419.7 kb/s) (average 15071.4 kb/s)
putting file /usr/local/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL (13999.7 kb/s) (average 15043.4 kb/s)
Running command: rpcclient localhost -N -U'root%12345' -c 'adddriver "Windows 4.0" "Canon_BJC:ADOBEPS4.DRV:Canon_BJC.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,Canon_BJC.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'
cmd = adddriver "Windows 4.0" "Canon_BJC:ADOBEPS4.DRV:Canon_BJC.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,Canon_BJC.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"
Printer Driver Canon_BJC successfully installed.
Running command: rpcclient localhost -N -U'root%12345' -c 'setdriver Canon_BJC Canon_BJC'
cmd = setdriver Canon_BJC Canon_BJC
Succesfully set Canon_BJC to driver Canon_BJC.
35) Verified Adobe drivers copied to print$ share
root at geoff:/usr/local/share/cups/drivers# ll -R /usr/local/samba/printers/
total 4
drwxrwxrwx 4 root wheel 512 Apr 1 05:12 ./
drwx--x--x 6 root wheel 512 Apr 1 05:11 ../
drwxr-xr-x 3 root wheel 512 Apr 1 05:12 W32X86/
drwxr-xr-x 3 root wheel 512 Apr 1 05:12 WIN40/
/usr/local/samba/printers/W32X86:
total 3
drwxr-xr-x 3 root wheel 512 Apr 1 05:12 ./
drwxrwxrwx 4 root wheel 512 Apr 1 05:12 ../
drwxr-xr-x 2 root wheel 512 Apr 1 05:12 2/
/usr/local/samba/printers/W32X86/2:
total 708
drwxr-xr-x 2 root wheel 512 Apr 1 05:12 ./
drwxr-xr-x 3 root wheel 512 Apr 1 05:12 ../
-rwxr--r-- 1 root wheel 434400 Apr 1 05:12 ADOBEPS5.DLL*
-rwxr--r-- 1 root wheel 109568 Apr 1 05:12 ADOBEPSU.DLL*
-rwxr--r-- 1 root wheel 18082 Apr 1 05:12 ADOBEPSU.HLP*
-rwxr--r-- 1 root wheel 120593 Apr 1 05:12 Canon_BJC.PPD*
/usr/local/samba/printers/WIN40:
total 3
drwxr-xr-x 3 root wheel 512 Apr 1 05:12 ./
drwxrwxrwx 4 root wheel 512 Apr 1 05:12 ../
drwxr-xr-x 2 root wheel 512 Apr 1 05:12 0/
/usr/local/samba/printers/WIN40/0:
total 2368
drwxr-xr-x 2 root wheel 512 Apr 1 05:12 ./
drwxr-xr-x 3 root wheel 512 Apr 1 05:12 ../
-rwxr--r-- 1 root wheel 575573 Apr 1 05:12 ADFONTS.MFM*
-rwxr--r-- 1 root wheel 1278976 Apr 1 05:12 ADOBEPS4.DRV*
-rwxr--r-- 1 root wheel 192772 Apr 1 05:12 ADOBEPS4.HLP*
-rwxr--r-- 1 root wheel 120593 Apr 1 05:12 Canon_BJC.PPD*
-rwxr--r-- 1 root wheel 13492 Apr 1 05:12 DEFPRTR2.PPD*
-rwxr--r-- 1 root wheel 118128 Apr 1 05:12 ICONLIB.DLL*
-rwxr--r-- 1 root wheel 57344 Apr 1 05:12 PSMON.DLL*
36) Stoped and restarted samba
37) Verified startup via smbstatus
On Windows XP SP1 laptop:
38) Deleted existing Canon_BJC printer connection
39) Verified Canon_BJC driver was no longer on system ('Server Properties')
40) Browsed network to printer and Connected.
41) Right clicked on printer and pulled up properties.
42) Properties pulled up correctly.
43) Test page printed successfully.
44) Repeated rpcclient enumprinters 2:
root at geoff:/usr/local/share/cups/drivers# rpcclient -U root localhost -c "enumprinters 2"
Password:
cmd = enumprinters 2
servername:[\\localhost]
printername:[\\localhost\Canon_BJC]
sharename:[Canon_BJC]
portname:[Samba Printer Port]
drivername:[Canon_BJC]
comment:[Canon BJC-2110]
location:[]
sepfile:[]
printprocessor:[winprint]
datatype:[RAW]
parameters:[]
attributes:[0x18]
priority:[0x1]
defaultpriority:[0x1]
starttime:[0x0]
untiltime:[0x0]
status:[0x0]
cjobs:[0x1]
averageppm:[0x0]
45) Repeated rpcclient enumprinters 3:
root at geoff:/usr/local/share/cups/drivers# rpcclient -U root localhost -c "enumprinters 3"
Password:
cmd = enumprinters 3
result was NT_STATUS_UNSUCCESSFUL
More information about the samba
mailing list