Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-27-2003, 01:21 AM   #1
Registered: Feb 2003
Posts: 36

Rep: Reputation: 15
Unhappy smb & cups printing problem

I have Samba set-up as a windows PDC on RH7.3 and CUPS for printing. Domain logons and fileserving works fine for Win2000 clients but I am now trying to get Win2000 network clients to print to our HP Jetdirect network printers through Samba and CUPS.

CUPS is installed and configured correctly AFAIK (I can print test pages via the CUPS admin interface). I can see the network printer through the add printer applet on the Windows machine and install it using a local driver (it reports that the driver on the server is the wrong one) but when trying to do a test print from a Win2000 client I get a message like "Test page failed to print... Unable to create print job."

I then checked the log.smbd and it has an entry:

Unable to connect to CUPS server localhost - Connection refused

Here is my smb.conf:

# Samba config file created using SWAT
# from (
# Date: 2003/02/27 17:15:29

# Global parameters
workgroup = MACSERVICE
server string = Samba Server
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 0
announce version = 4
time server = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = cups
logon script = logonscript.bat '%G'
logon drive = g:
domain logons = Yes
os level = 99
preferred master = Yes
domain master = Yes
dns proxy = No
wins support = Yes
winbind uid = 10000-20000
winbind gid = 10000-20000
template shell = /bin/bash
winbind separator = +
winbind cache time = 10
hosts allow = 10.0.0. 127.
printing = cups

comment = Home Directories
read only = No
create mask = 0664
directory mask = 0775
browseable = No

comment = All Printers
path = /var/spool/samba
printer admin = root
guest ok = Yes
printable = Yes
print command = lpr-cups -P %p -o raw %s
browseable = No

<-- irreleveant share stuff removed -->

comment = Netlogon share
path = /data/netlogon
write list = @admins
oplocks = No

path = /var/spool/samba
read only = No
printable = Yes
printer name = HP_LJ4Si_Test
use client driver = Yes
oplocks = No

comment = Printer Drivers
path = /data/printer_drivers
write list = root

Any ideas?

Old 02-27-2003, 02:30 PM   #2
LQ Newbie
Registered: Feb 2003
Distribution: debian
Posts: 2

Rep: Reputation: 0
You should test the option : map to guest =bad user, and for W2k ws adding something like, if my memory is good, use client driver = yes.
What seems strange with your config file, is that you use winbind which is not neaded as your config file makes your samba server a domain master.
Good luck
Old 02-27-2003, 07:03 PM   #3
Registered: Feb 2003
Posts: 36

Original Poster
Rep: Reputation: 15
..ok I added the options you mentioned - I also deleted the printer from Samba and let it find it in CUPS again (does it automatically which is pretty cool) as I had changed some of the smb.conf stuff for the printer and wasnt sure if changing the defaults was affecting anything.

..anyhow now I am not getting the "unable to connect to CUPS" error in the Samba log so I got somewhere but am still unable to print from the Win2000 workstations. I have tried a number of different drivers on the workstation - they install ok and when I select the printer it comes with status of "ready" but wont print.

I'm pretty new to Linux & Samba - we are migrating from an NT network to Linux/Samba - probably why the winbind stuff is still in the conf (I didnt do the original Samba config). Should I remove the winbind stuff - it shouldnt affect printing though should it?

I'm thinking I must be doing something wrong in the way I set-up the printer on the Win2000 ws? The printer is a HP Laserjet 4si and is using the driver: "HP Laserjet 4V, 4Si, CUPS-GIMP-print v4.2.0"

...does anyone have any ideas?
Old 02-28-2003, 05:44 AM   #4
LQ Newbie
Registered: Feb 2003
Distribution: debian
Posts: 2

Rep: Reputation: 0
Well everything seems good ! I had the same problem it was because print command = ... was not well set so you can do a verification with "testparm | more" to check. Wat you can also do is to change your printer configuration with cups and select the raw driver it means in fact direct to the printer !
Hope it will help !
Old 12-08-2004, 02:48 AM   #5
LQ Newbie
Registered: Dec 2004
Location: Newcastle, Australia
Distribution: Fedora Core 3
Posts: 1

Rep: Reputation: 0
Hi All,

I had the same problems you all did and I've worked through many different guides and forum thingies to try to get it to work... in the long run, i've made it.

below is a copy of my smb.conf file. Also remember to allow the raw printing in the cups config and to open port 631 in the firewall and you should be up and running.

Hope it helps someone out.

- Lucas.

==== start: smb.conf ====

printcap name = cups
printing = cups
workgroup = insideanimation
password server = None
guest ok = yes
guest account = smbprint
security = share
browseable = yes
printable = yes
guest ok = yes
public = yes
use client driver = yes
create mask = 0700
guest only = yes
guest account = smbprint
path = /home/smbprint

comment = Lucas' Files
path = /home/lucas
writeable = yes
guest ok = yes

==== end: smb.conf ====


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CUPS over SMB only printing one copy MikeBest Linux - Software 8 05-21-2010 04:08 AM
Is there a guide anywhere that helps set up CUPS printing using SMB printers? Royle Debian 2 02-20-2005 05:32 PM
remote cups printing to a smb/cups print server? justanothergeek Linux - Networking 2 09-15-2004 09:31 AM
cups, smb printing problem? lynchmob09 Linux - Networking 0 02-16-2004 09:43 AM
Cups and smb printing with RH 7.3 Sylhouette Linux - Software 0 05-13-2002 01:28 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration