[Samba] printing via samba w/ cups server

Mike Weller test3 at zyvex.com
Tue Mar 5 22:36:03 GMT 2002


Hi,

I have a bizarre printing problem, and i think i've narrowed it down
to either samba, or the way windows packages the file to be printed.
I've recently implemented a new server.  Users print through the
linux server from their windows desktop machines.

OLD server:

-samba 2.0.7, which uses lpd

NEW server:

-samba 2.2.3, which uses cups

The old server can print to the printer (Savin 2545 pcl) just fine.
The new server prints all sorts of garbage and hieroglyphics to 
that printer.

I'll cut out the relevant pieces of smb.conf for you:

OLD:
        printing = bsd
        print command = lpr -r -P%p %s

NEW:
   printing = cups
   print command = lpr-cups -P %p -o raw %s -r


I KNOW that lpr-cups is configured fine.  I can get rid of
"-r" for file removal, and actually copy over the samba-printer TEMP 
file from the OLD server to the NEW server and execute:

NEWSERVER#  lpr-cups -P savin -o raw TEMP_FILE_ON_OLD_SERVER

and it prints just fine.

If I take a look at the TEMP file generated on the new server, it
does indeed look different:

first line for the working temp file looks like:
^[%-12345X at PJL JOB NAME="http://www.cbc.ca"

first line for the non-working temp file looks like: 
^N^@^@^@^C^@^@^@^@^[%-12345X at PJL JOB NAME="http://www.cbc.ca"

Since this is independent of the print server (lpd/cups), I was
wondering if maybe samba was modifying the file at all.

I changed the  cups/lpr-cups lines in the new smb.conf to the
old one (bsd/lpr), and that did not work (how often does smb.conf
get read? i rebooted my computer and checked smb.conf's last access
time with "ls -lut smb.conf" so i assume it's ok).

One more relevant thing that might make a difference.  On the Windows
box, if I view the port properties, it says:

PRINTER via OLD server:
\\oldserver\savin  LAN Manager Printer   savin

PRINTER via NEW server:
Samba Printer Port Local Port            gutenberg, berlow, savin

(it lists all of the printers for some reason).  I'm not sure how to
revert back to the LAN Manager configuration as in Samba 2.0.7.
I hope I don't need to.

If anyone can help guide me, I'd really appreciate it!
Thanks.

-Mike




More information about the samba mailing list