PDA

View Full Version : Samba printer problems in FC6


Don-B
19th January 2007, 02:37 AM
I have a newly built FC6 box running MythTv and Samba. Samba gives me access from a Win2000 box to the hard drives and a laser printer on the FC6 box. All works great except remote access to the printer, which is an HP LaserJet5L (works fine locally).

I can see and configure the printer in the Windows system, but when I attempt to print, I get "Access Denied, unable to connect" or an instant "Failed to print...." message. Anyone have suggestions on what to look for?

By the way, I have a second box that is almost identical to this one, except it has an Hp LaserJet-1100. It worked fine when it had FC5. I wiped it clean and upgraded it to FC6 (for various reasons). Now the printer fails on it also. Thanks in advance for the help,

Don

PS - FC6 / Cups V-1.2.5 / smbd - V- 3.0.23c-2 / swat - V-unknown

glennzo
19th January 2007, 03:10 AM
I don't know how much help I can be to you. I can tell you that all the computers in this household print to a printer connected to a Fedora Core 6 box. There's a mixed bag of OS's on the computers. Some Fedora Core 6, some Windows XP and one Vista Beta. Here's my /etc/samba/smb.conf and my /etc/hosts files, with the computer called 'Oldendorff' being the FC6 box with the printer attached, the 'server'.

[global]
netbios name = Oldendorff
server string = Server Oldendorff
workgroup = JOHNSON
security = share
#encrypt passwords = yes
#smb passwd file = /var/lib/samba/private/smbpasswd
log file = /var/log/samba/%m.log
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
#wins support = yes
#hostname lookups = yes
#hosts equiv = /etc/hosts
#hosts deny = All
#hosts allow = 192.168.1.1/255.255.255.0 localhost
#hosts deny = All
#interfaces = lo eth0
#bind interfaces only = yes
guest ok = yes
#browse list = yes
printcap name = cups
printing = cups
load printers = yes

# Linux shares
[johnson]
path = /backups/johnson
Comment = Johnson Backup Share
guest ok = yes
browseable = yes
writable = yes
public = yes
read only = no

[grace]
path = /backups/grace
Comment = Grace Backup Share
guest ok = yes
browseable = yes
writable = yes
public = yes
read only = no

[public]
path = /home/public
comment = Public Shared Folder
guest ok = yes
browseable = yes
public = yes
writable = yes
read only = no

[homes]
comment = User's home directory
path = /home/%U
read only = no
valid users = %U root

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

[EPSON]
comment = LinuxEpson
printable = yes
path = /var/spool/samba
public = yes
guest ok = yes

#Windows shares
[c]
Comment = Windows Drive C share
path = /media/win1
public = yes
writable = yes
read only = no
browseable = yes
guest ok = yes

[d]
Comment = Windows Drive D share
path = /media/win2
public = yes
writable = no
read only = yes
browseable = yes
guest ok = yes

/etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
#::1 localhost.localdomain localhost
127.0.0.1 oldendorff.localdomain oldendorff localhost.localdomain localhost
192.168.1.100 meg
192.168.1.101 dad
192.168.1.102 neville
192.168.1.103 oldendorff
192.168.1.104 mom

I want to add that all the computers have static ip addresses. My choice, but it seems to make networking between Linux boxes much easier. Matter of fact, I've installed Debian Etch on my computer and FC6 on another. When I went to add printers to those setups they were already there. Sort of automagically configured and they worked! Looking at /system/administration/printing the printer on this box has a device URI of ipp://192.168.1.103:631/printers/epson .

Hope this is of some help!

Don-B
19th January 2007, 04:09 AM

Thanks for the help, I see a couple of thing I might try. I'll check these out tomorrow night.

Don

Don-B
20th January 2007, 03:43 AM
Success! While I was comparing your smb.conf to mine, I noticed that spooler path was incorrect. The default path was:

path = /usr/spool/samba

...but it doesn't exist. The correct path is:

path = /var/spool/samba

It works fine now, but one strange thing still happens. The Win2000 print display still says that it cannot connect to the printer, but when I try to print, it works fine. Oh well, another strange Windows behavior! Thanks again for the help.

Don

glennzo
20th January 2007, 01:03 PM
Same thing with me. Most of the WindowsXP boxes show the printer as 'unable to connect', from time to time, but will still print. Other times they're happy with the printer. It's probably something that needs fine tuning.

spk037
20th January 2007, 06:13 PM
samba printing can be flaky at times. once in awhile no matter what i try the win box just cant print to a samba printer.
in those cases, i find installing print services for unix on the win box to work great.
just go to add/remove,
windows setup.
other network services. add print services for unix.

setting up the printer, add port, choose lpd, enter ip addy of nix box add port ie, lp0, lp1, etc. works like a charm

pvollma
14th March 2007, 10:56 PM
Just went through a couple of frustrating hours trying to get printing working on Samba from a Windows XP system (had it working fine using RH8 on the same box, different drive). All file shares worked fine, the printer showed up in the listing on the XP machine, but I was getting "Access denied" messages when I would define the printer, and then printing failures. Thanks to the post above about /var/spool/samba instead of /usr/spool/samba, I finally got it to work.

This was fixed by, 1) adding "use client driver = yes" to the [printers] section of smb.conf (a trick I found on another Linux forum), which allowed me to get rid of the "access denied" message from XP when defining the printer, and 2) changing the path as mentioned.

My questions now are:

1) has this bug been reported? (this was a straight FC6 install using only system-config-samba to generate the smb.conf file)?
2) will these edits be wiped out if I rerun system-config.samba or SWAT?

BadFish
22nd May 2007, 08:38 PM
samba printing can be flaky at times. once in awhile no matter what i try the win box just cant print to a samba printer.
in those cases, i find installing print services for unix on the win box to work great.
just go to add/remove,
windows setup.
other network services. add print services for unix.

setting up the printer, add port, choose lpd, enter ip addy of nix box add port ie, lp0, lp1, etc. works like a charm


Oh thats too bad, I was going to try to use a linux print server at work.
I have about 25 printer. Well hopefully linux will grow up and someday
be a viable solution for the work place.


thanks for the heads up.

glennzo
22nd May 2007, 09:10 PM
Well hopefully linux will grow up and someday
be a viable solution for the work place.


thanks for the heads up.
Ooohhhh! If I was sensitive that would sting!

spk037
23rd May 2007, 04:37 PM
Oh thats too bad, I was going to try to use a linux print server at work.
I have about 25 printer. Well hopefully linux will grow up and someday
be a viable solution for the work place.


thanks for the heads up.

badfish is a funny boy. now that you informed me linux isnt a viable work solution, i'll have to get rid of all my fedora boxes and tell my 2000 customers running their servers on redhat that we need to migrate to windows vista, " the most secure windows yet" :eek:
never mind the bugs, security holes, drm, constant activation hassles, the os spying on you, the massive hw requirements needed to run the bloatware and high prices, to name just a few "features."
its all worhtwhile if you have to actually tweak a file on a linux box or install a component in windows to print. I see the light now. :D