-   Linux - Newbie (
-   -   Printing to Linux printer from both Linux and Windows (

cezarn 11-25-2003 04:28 PM

Printing to Linux printer from both Linux and Windows

I have a 3 boxes network at home, 2 of them RedHat 9 and one W2K. One RH9 system has a locally installed Canon printer.
The problem that I'm having is I can't print from neither computer to this printer although the printer is shared (Sharing - All hosts). The printer is working fine locally.
I have Samba setup and I can access files from no matter which computer to the others.
In W2K I can see and install the Linux printer but I have "access denied, unable to connect" message when I look at the printer status.
If I try to print from both systems, it looks like it sends the files, no error message, but nothing gets printed.

Here is my smb.conf printer's section (quite basic) :
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = yes
printable = yes
guest ok = yes

I created a smb user with the same name and password as the Windows one.

I fight with this one for couple of days now and it drives me NUTS !!! When I first installed RH9 and the printer it was working fine from both computers but then I installed many other programs and it stopped working...

Can someone give hint on this one please,
Thank you,

wldkos 11-25-2003 05:34 PM

It's been asked, try a search. Best of luck.

cezarn 11-25-2003 06:28 PM

The first thing was to search the forum but each of the answers seems to be particular and after trying many of them I didn't find a solution that worked in my case.


wldkos 11-26-2003 01:17 AM

maybe change the browseable to "yes". Also, I used webmin and swat to help me setup shares and I know in there you can setup printers as well. IN windows when browsing my linux server, I can see that windows is sharing a printer that linux can use. I said that kind of strange.... but your permissions are wrong for the printer share.

cezarn 11-26-2003 07:53 AM

Thank you wldkos for your reply.

I tried also webmin, nice tool, but everytime I edit samba with webmin, trying to start the gnome's Samba Server tool fails and smb.conf file shows truncated.

I changed in samba.conf the browsable to yes.
One problem though :
the printer section from smb.comf is different than what testparm shows.
this is testparm dump for printers
comment = All Printers
read only = No
printable = Yes
browseable = No

and this is the smb.conf
printer = CanonLinux
comment = All Printers
browseable = yes
writeable = yes
printable = yes
path = /var/spool/samba

Is this normal ?


Poprocks 11-26-2003 08:28 AM

try adding "public = yes" to the [printers] section.

cezarn 11-26-2003 09:19 AM

Thanks for reply Poprocks

comment = All Printers
path = /var/spool/samba
browseable = yes
# Set public = yes to allow user 'guest account' to print
printable = yes
public = yes

Still not working, the windows pc has "access denied" for the printer

Poprocks 12-02-2003 11:08 AM

what security level do you have? Check the globals. If you have security = user, try changing "user" to "share."

If that doesn't work, it's time to get this going quick & dirty. Keep the "share" level security, and adduser "smbprint" (or whatever you want.) Type "mkdir /home/smbprint/spool" and do "chmod -R 777 /home/smbprint/spool" Go to the printer section, add "guest ok = yes," "guest only = yes," "guest account = smbprint," "path = /home/smbprint/spool" -- I _think_ you have to get rid of the public = yes line, but I'm not totally sure. I believe all the other lines can be kept intact, but you may have to tinker with it a little bit to get it to work

cezarn 12-02-2003 12:52 PM

Thank you Poprocks for your reply.

I have 2 questions tough:
1. Should I add the smbprint user to samba?
2. What should I tell Windows to look for? What should be Windows configuration for the printer?


Poprocks 12-02-2003 03:45 PM

If you've set up your local Linux printer with CUPS (be it with KDE, GNOME, or the web configuration tool), as long as you keep your smb.conf file intact aside from the changes I told you about, you should just be able to open "My network places" in Windows XP or "network neighborhood" in Windows 9X (not quite sure what it is in 2k... In XP (that's all I'm familiar with ATM, sorry) you should be able to just navigate the network and locate your linux box. From there, just double-click your printer and windows (should) do the rest.

If you can't find your machine, make sure you've set security to share, and make sure that you've set a workgroup name and a netbios name in your [globals] section of smb.conf.

and no, you don't have to add smbprint to samba. Just using the adduser script should do.

cezarn 12-02-2003 03:52 PM

Hi Poprocks

Yes, my printer is set up with CUPS.
Yes, I can see the printer attached to my Linux box but hte problem is the printer shows "Acces Denied ..." status in the printer listing on W2K and if I try to send something to the printer is looks like it went (no error message) but nothing gets printed, no doc in the query nothing.
One strange thing with samba is that each time I open the gnome's Samba Config tool the workgroup name is missing. The security is to share and the guest account is set to nobody (!?!)


Poprocks 12-02-2003 04:00 PM

Oh, you've been using the GNOME samba tool? I was talking about editing the /etc/samba/smb.conf file... that's where you'll want to manually make changes (like guest account) -- but if you want to use GNOME that should be fine too... just make sure you set the guest account to "smbprint" and make _sure_ you set "guest ok = yes," "guest only = yes" in the smb.conf file

cezarn 12-02-2003 04:09 PM

Oh, I edited manually smb.conf. I was just telling you about what it seems to be strange related to Samba :-)
Here is the [printers] from smb.conf :
comment = All Printers
path = /home/smbprint/spool
browseable = yes
# Set public = yes to allow user 'guest account' to print
printable = yes
guest ok = yes
guest only = yes
guest account = smbprint

Poprocks 12-02-2003 04:25 PM

well, here's the resource I used to get my SAMBA printer to work in Windows.
I was trying to explain it to you without a smb.conf file in front of me and with very vague memories of how I did it. So, I hope that page helps you as much as it helped me.

cezarn 12-02-2003 06:41 PM

Thanks a lot for the link.

I tried, now the W2K sees the printer as Ready but when I send to the printer nothing happens :-(
I'll try couple of other things see what happens,


All times are GMT -5. The time now is 04:21 PM.