Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a HP Deskjet hooked up to a Slackware 12.2 box. I've got CUPS set up and can print a test page from the box just fine. I've also got Samba set up and have a couple file shares that work fine.

I'm trying to share that HP Deskjet out via Samba, but I can't get it to show up in any Windows system. I see the server and its file shares in Windows networking, but when I open the Printers, no printer shows up. Running net view \\servername from the command line lists the file shares, but no printers.

Here's the pertinent part of my smb.conf, if that helps:

[global]
workgroup = HOMENET
security = share
hosts allow = 192.168.1. 192.168.2. 127.
load printers = yes
printcap name = cups
printing = cups
log file = /var/log/samba.%m
max log size = 50

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
public = yes
writable = no
printable = yes
guest only = yes

Can anyone give me some pointers as to where to start looking for potential causes?


Update: Running testparm shows no errors. Here's the output (minus the file shares):

[global]
workgroup = HOMENET
security = SHARE
log file = /var/log/samba.%m
max log size = 50
printcap name = cups
hosts allow = 192.168.1., 192.168.2., 127.

[printers]
comment = All Printers
path = /var/spool/samba
guest only = Yes
guest ok = Yes
printable = Yes
browseable = No
share|improve this question
    
can you do a testparm and update your question? –  caliban Sep 3 '09 at 3:21
    
does your path /var/spool/samba exist? –  Kurt Pfeifle Jul 29 '10 at 23:12
    
Which version of Samba have you installed? Which version(s) of Windows clients have you tested? –  Kurt Pfeifle Jul 29 '10 at 23:16
    
Is your CUPS configured to share printers? Is your smbd compiled with support for libcups? [Run ldd smbd | grep libcups to find out...] –  Kurt Pfeifle Jul 29 '10 at 23:21
    
Do you still have this problem? –  Oliver Salzburg Apr 26 '12 at 23:38

5 Answers 5

My fresh install of Windows 7 Home Premium on a Gateway ML-3109, with NOD32 could not see my samba shares and shared printers on my Debian computer.

Windows 7 could ping the Debian machine, but the Debian machine could not ping the Windows 7 laptop (because Windows 7 was not listening).

I suspected my Samba settings were correct, because the prior Vista install on the same laptop as well as an XP install on another laptop were functioning correctly, so I focused on the Windows 7 install.

Tried all the various windows registry hacks, compatibility levels, credentials and etc. that I've seen in multiple forums without success, plus a handful of firewall adjustments no joy at all.

Frustrated, I decided to start from scratch and nuked the windows 7 install. During the windows install Windows asks you if this is a home or work computer. First time around I had selected home computer so this time I selected "work computer."

PooF! That was the trick. Turns out the "HOMEGROUP" garbage assumes your home network is homogeneous Windows 7 machines only, and shuts out all others. No doubt another Microsoft "undocumented security feature."

As a "work computer" I could add printers, browse the network, map to network drives and use all the normal network functionality with ease.

Note this is not the same as telling Windows 7 the network you're connecting to is home, work or public. If you're at that step it's too late. The dialog box you're looking for to solve this problem is during the actual install.

I realize this solution might not be an option for some, but this is what worked for me (and it was more fun to wipe the hard drive than create/registry keys all afternoon anyway).

share|improve this answer

Shouldn't that be browsable = yes to allow them to show up in net view

Edit This was wrong, on looking at this page http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/classicalprinting.html#id2622601 I found the current setting was correct.

share|improve this answer
    
I updated the smb.conf and restarted samba, but it didn't seem to make a difference. Strangely, running testparm after changing the setting still shows browseable = No. No idea why. –  mrdrbob Sep 7 '09 at 1:19
    
No, you were right at the start have a look at the link I've added –  Col Sep 8 '09 at 8:01

Here's the Samba page on printing with CUPS. I'm not a CUPS wizard (last time I did this, LPRng was still the new hotness) but apparently part of the CUPS setup is to create a print queue.

If you've already done that, you should be able to install a printer on the Windows machine and give it the network address

\\smbserver\print_q

.. even if you can't browse directly to the printer. Obviously, replace "smbserver" with the name of the server and "print_q" with the name of the print queue.

You should be able to access CUPS configuration at http://localhost:631 and documentation at http://localhost:631/documentation.html (open these on your Linux system; they may be firewalled from remote access). If you haven't configured a print queue, that's where to start; if you have, it will probably be listed there.

share|improve this answer

Don't you need to fill in all octets on the addresses? For example:

hosts allow = 192.168.1.0 192.168.2.0 127.0.0.0

I used these steps to print from an XP laptop to an Ubuntu 9.04 PC with an HP 5600 printer/fax

Add shared Ubuntu printer to XP laptop

Just replace the IP address and printer name with what you have on your LAN. Using the generic manufacturer and MS Publisher imagesetter allowed successful printing.

share|improve this answer
    
that might work, but it looks like you're contacting CUPS directly over HTTP. that's not going via Samba -- this loses Samba access controls, for one. tho that may not matter for the OP. –  quack quixote Oct 19 '09 at 7:55

Have you checked the settings in /etc/cups/cupsd.conf? You may not have told CUPS to allow browsing. From my cupsd.conf:

Browsing On
BrowsOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL

There's also a BrowseLocalProtocols directive that can limit to SMB.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.