[Samba] Can't print with CUPS using samba's printer share
marc at maxiscreen.com
Thu Jun 17 19:00:56 GMT 2004
My help request is about samba that can't print using CUPS from windows.
I tryed to search for help on mailing-lists archives all around, and with
the great Samba-HOWTO-Collection.pdf but didn't found a clue about my
I can print the CUPS test page, but can't print anything from windows
using samba's share.
I use samba-3.0.2a I compiled myself. It has been linked with CUPS:
counter-strike:/usr/src# ldd /usr/local/sbin/smbd
libcups.so.2 => /usr/lib/libcups.so.2 (0x40017000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4002f000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40044000)
libresolv.so.2 => /lib/libresolv.so.2 (0x40071000)
libdl.so.2 => /lib/libdl.so.2 (0x40081000)
libc.so.6 => /lib/libc.so.6 (0x40084000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
In the manual, it is said that if I want to print from windows, best is to
use CUPS, and it is also said that I only need to have "printing = cups"
and "printcap name = cups".
Well, with printcap name = cups, samba don't like it, telling me it can't
open file cups in the log.smbd file... Nevermind, I have put the line
"Printcap /etc/printcap" in the cups configuration file. Then I changed
the "printcap name = cups" by a "printcap name = /etc/printcap" in the
smb.conf file. It seems both samba and cups likes that, just said what I
did in case of something isn't ok.
Now, I see the linux printer on the windows client.
I still haven't put the automatic driver download, but will do that when
the printing works.
So, I make add printer, no problems to connect to it. I put the local
driver on it, looks ok.
Then I start to send a test page on the printer, and nothing happens..
I can just see in /var/log/samba/log.windows_client that it can't find lpq
(probably to list current tasks), and it can't find lpr too:
sh: lpq: command not found
sh: lpr: command not found
Note: I don't have any LPR installed. just CUPS.
The manual says samba should not need lpr if using cups, so I don't know
if it helps.
I got no error message in windows, and no more trace on the logs... Not
even with debug2 for cups !
Something strange, my /etc/printcap file only has the printer name and no
params as I would have expected:
About the spools, CUPS uses /var/spool/cups and it is owned by lp / sys.
Samba is configured to use the /var/spool/samba directory with full 777
chmod (temp to remove one possibility of failure)
In the cups config, the allowed hosts contains the 127.0.0.1
Both CUPS and samba are hosted on the same linux computer.
Here are the interresting lines on my smb.conf file:
load printers = yes
printing = cups
printcap name = /etc/printcap
comment = All Printers
path = /var/spool/samba
public = yes
guest ok = yes
writable = no
printable = yes
printer admin = root, @ntamdins
I hope someone has a clue on my problem, as I really don't understand
what's going wrong :/
Thank you for your help and for a great software you've made / you're
PS: I posted on the samba mailing list because I think it must come from
samba since CUPS test page works fine, but I may be wrong thinking the
problem comes from samba :~/
More information about the samba