"Cannot connect" printing from XP to Samba/CUPS

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
I'm trying to get my Windows XP machine to print to an OpenBSD Samba server running CUPS. I can see the printer in NN, but, after selecting the driver, I get a message "Windows cannot connect to the printer..." From what I can tell from searching the 'Net, this is pretty common, but solutions seem to vary. None have worked so far for me. As far as I can tell, the problem is in the Samba printer configuration - I can print locally from the server, over the network (using IPP) from Linux machines, and file-sharing through Samba works just fine. I've tried many smb.conf variations, but here's a typical one:

printing = cups

[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
guest ok = yes
writable = no
printable = yes
use client driver = yes

That last line supposedly solved this problem for many people. I've also tried "printcap type = cups", "printing = bsd", and specifying the print/cancel commands explicitly. But I get that same "Cannot connect" error regardless. I get nothing in any of the smbd or cups logs on the server that gives me any hints. Support for CUPS is compiled into Samba.

If there's anything I left out, I'm happy to supply it. What I'd really like, though, is the corresponding smb.conf snippet from someone who has XP --> Samba/CUPS printing working correctly. I'm sure I can deduce any OS or configuration differences from there.
 

mindwarp

Senior member
Feb 8, 2001
286
0
0
Usually I make sure under the [printer] section that I have guest = yes, browsable = yes
Then I have under the [global] section:

map to guest = bad user

That seems to fix all problems, while effectively destroying any security :)

 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Nope. No difference. Besides that, I tried playing around with specifying the guest account, and making sure that account could print as well. Still XP says it cannot connect after I install the drivers.

Thanks for the suggestion, though... Keep em coming.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Well, not solved, but worked around, at least. Whatever security problems I was having can be circumvented by setting up CUPS/Samba to push out generic Postscript drivers to the clients. Of course, it would appear that printing using the Windows-native driver and passing the raw data to the printer should be easier, but whatever... it works.