LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-21-2006, 12:48 PM   #1
msmarino
LQ Newbie
 
Registered: Nov 2006
Distribution: Ubuntu & Debian
Posts: 4

Rep: Reputation: 0
XP wont print to Samba, but Linux works


Hi all.

I have a small LAN:
  • Server (Debian Sarge)
  • Workstation (XP)
  • Laptop (Dual-Boot XP/Ubuntu)

Printer (HP 970Cxi) is connected via USB to Server, configured with Cups (1.1) and shared via Samba (3.0.14a-Debian).

Code:
# Samba config file created using SWAT
# from 192.168.11.6 (192.168.11.6)
# Date: 2006/11/21 18:50:51

# Global parameters
[global]
        workgroup = GRUPO_TRABAJO
        server string = %h server (Samba %v)
        security = SHARE
        encrypt passwords = No
        passdb backend = tdbsam, guest
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        printcap name = cups
        dns proxy = No
        ldap ssl = no
        panic action = /usr/share/samba/panic-action %d
        invalid users = root
        printing = cups
        print command =
        lpq command = %p
        lprm command =
        include = /etc/samba/dhcp.conf

[homes]
        comment = Home Directories
        create mask = 0700
        directory mask = 0700
        browseable = No

[printers]
        comment = All Printers
        path = /tmp
        printer admin = marcos, root
        guest ok = Yes
        printable = Yes
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers

[Compartido]
        path = /var/shared
        guest ok = Yes

[HP970]
        path = /tmp
        guest ok = Yes
        printable = Yes
        printer name = HP970
The point is, I can't print from XP, either the laptop or the workstation although Ubuntu prints perfectly via the same share.

Symptoms are
  • printer shows as "access denied" in xp control panel
  • printer properties dialog is slow appearing
  • attempting to print a test page hangs the printer property dialog

Folder shares all work perfectly on all systems.

XP Firewalls are deactivated. I've tried removing and reinstaling the share, all to no avail.

What am I missing?

Thanks in advance.
 
Old 11-22-2006, 07:10 AM   #2
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,286

Rep: Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802
I have XP machines printing using Samba and CUPS.
In my configuration, the printers are set as raw print queues in CUPS and printer drivers are installed on the XP machines. i.e. The XP machines format the print output and this is piped to the printers via CUPS.

The "access denied" message can be made to go away by setting the security permissions in XP so that XP does not have permissions to administer the printers.

The printer properties page being slow to appear is a problem that I observe on one XP machine, and I am yet to find an answer.
 
Old 11-22-2006, 12:30 PM   #3
msmarino
LQ Newbie
 
Registered: Nov 2006
Distribution: Ubuntu & Debian
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the response.

Quote:
Originally Posted by allend
I have XP machines printing using Samba and CUPS.
In my configuration, the printers are set as raw print queues in CUPS and printer drivers are installed on the XP machines. i.e. The XP machines format the print output and this is piped to the printers via CUPS.
This is my case too.

Quote:
Originally Posted by allend
The "access denied" message can be made to go away by setting the security permissions in XP so that XP does not have permissions to administer the printers.

The printer properties page being slow to appear is a problem that I observe on one XP machine, and I am yet to find an answer.
These are symptoms I can live with.

What I can't live with is not being able to print.

I have had this configuration working but it recently broke and I'm not entirely sure it wasn't something I touched or a Debian or XP update.
 
Old 11-22-2006, 06:38 PM   #4
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,286

Rep: Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802
Have you tried reinstalling the printer driver on the XP machines?

It may pay to check that the printer driver is up to date. I know that I had problems with printing to an HP4200tn following an XP update that was resolved by installing an updated driver.

Last edited by allend; 11-22-2006 at 06:41 PM.
 
Old 11-22-2006, 08:01 PM   #5
zetabill
Member
 
Registered: Oct 2005
Location: Rhode Island, USA
Distribution: Slackware, Xubuntu
Posts: 348

Rep: Reputation: 30
I hope you don't mind me piggybacking on this but it seems senseless to make another thread to ask the same question.

It seems as though setting this up is as simple as setting up the printer on the samba machine with the "driver" as Raw in CUPS, even though my model is listed, and then just running the driver installation CD on the Windows clients. I was going to go ahead and use the KDE Samba plugin to set up Samba as well.

Any thoughts? If the driver is set to raw then would it have problems printing from the Samba host itself? I want to cover all my bases because sometimes this server occasionally gets called to duty in the desktop arena. Just looking for some insight.

Thanks ahead of time.
 
Old 11-23-2006, 12:39 AM   #6
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,286

Rep: Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802
zetabill

I actually have two print queues per printer on my Linux servers.
One print queue is a raw print queue to which I direct the output from the Windows boxes.
The second print queue uses a CUPS printer driver to which I direct output from Linux/Unix boxes.
I do this because some of the applications on the Windows boxes perform their own print formatting and do not play nice with Linux (especially graphics).

You are correct in that you will need to configure both CUPS and Samba. How difficult this will be will depend on the level of security that you want to have. The CUPS and Samba documentation is very complete and takes a long time to digest. It may pay you to look for a HOWTO that provides guidance for the setup that you want.


msmarino

Another thought that I had regarding your problem. Check your /etc/cups/cupsd.conf to make sure that within the Location section you have allowed the IP address of your XP box.
My entries are like:

Deny all # Deny all unknown hosts
Allow 127.0.0.1 # To allow the Linux host to print
Allow 192.168.1.2 # To allow the host at 192.168.1.2 to print
 
Old 11-23-2006, 10:04 AM   #7
msmarino
LQ Newbie
 
Registered: Nov 2006
Distribution: Ubuntu & Debian
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by allend
Another thought that I had regarding your problem. Check your /etc/cups/cupsd.conf to make sure that within the Location section you have allowed the IP address of your XP box.
My entries are like:

Deny all # Deny all unknown hosts
Allow 127.0.0.1 # To allow the Linux host to print
Allow 192.168.1.2 # To allow the host at 192.168.1.2 to print
I've checked that, but thanks anyway.

I can print from linux on a dual boot laptop, but not from XP, and that is what has got me so confused.

Now, you say you have 2 print queues for your printers? How is that done? Is it possible I am inadvertantly using a CUPS queue from linux? When I select my printer in Ubuntu it shows as CUPS/hp970, even though I have configured it to use the Samba share.
 
Old 11-23-2006, 07:13 PM   #8
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,286

Rep: Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802
What happens when you change:
security = SHARE to security = user #in the [global] section of smb.conf and add
valid users = marcos, root #in the [printers] section of smb.conf
and then restart samba and cups?

Adding a second print queue is simply adding another printer with a different name, but with all other settings the same except the specification of the printer model rather than raw.
 
Old 11-23-2006, 10:49 PM   #9
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
Samba security should be set to user. Password encryption should be set to "yes". Make sure your users on the client system who might be printing are added to the samba user database.

Add this line to smb.conf global section:
print command = lpr-cups -P %p -o raw %s -r

I also have these commands under the [printers] section (not sure if one is redundant or not):

print command = lpr -P %p -o raw %s -r
lpq command = lpstat -o %p
lprm command = cancel %p-%j

Printer should be set up as a raw printer with all driver activity on the client.

Now edit these cups files (this is critically important):

In /etc/cups/mime.conv, toward the end of the file, uncomment this line:

# application/octet-stream application/vnd.cups-raw 0 -

Then, in /etc/cups/mime.types, toward the end of the file, uncomment this line:

application/octet-stream

I just went through all this three days ago when I upgraded my distro to Mandriva 2007, so it is fresh in my mind. Previously I had been network printing, and I reconfigured to make the printer local. This is how I shared it out, and it works just fine with Win2K and WinXP.
 
Old 11-27-2006, 03:08 PM   #10
msmarino
LQ Newbie
 
Registered: Nov 2006
Distribution: Ubuntu & Debian
Posts: 4

Original Poster
Rep: Reputation: 0
Sorry it's been so long without an answer. Had hardware problems

Quote:
Originally Posted by jiml8
Samba security should be set to user. Password encryption should be set to "yes". Make sure your users on the client system who might be printing are added to the samba user database.
This shouldn't be necessary unless something important has changed lately. I've had this setup working for a few months on SHARE security without problems... until now

Quote:
Originally Posted by jim18
Add this line to smb.conf global section:
print command = lpr-cups -P %p -o raw %s -r

I also have these commands under the [printers] section (not sure if one is redundant or not):

print command = lpr -P %p -o raw %s -r
lpq command = lpstat -o %p
lprm command = cancel %p-%j

Printer should be set up as a raw printer with all driver activity on the client.

Now edit these cups files (this is critically important):

In /etc/cups/mime.conv, toward the end of the file, uncomment this line:

# application/octet-stream application/vnd.cups-raw 0 -

Then, in /etc/cups/mime.types, toward the end of the file, uncomment this line:

application/octet-stream

I just went through all this three days ago when I upgraded my distro to Mandriva 2007, so it is fresh in my mind. Previously I had been network printing, and I reconfigured to make the printer local. This is how I shared it out, and it works just fine with Win2K and WinXP.
I've changed the rest to exactly what you have here and... nada! nothing! exactly the same!

Thanks anyway.
 
  


Reply

Tags
cups, printer sharing, samba, xp


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print server for LINUX and Windows using SAMBA masudur_iiu Linux - General 2 08-18-2006 12:07 PM
Linux Print Server Help (Samba) acascianelli Linux - Software 1 04-10-2006 05:30 PM
Linux File and Print Server with Samba bmc68 Linux - Newbie 1 01-27-2006 11:50 AM
Samba linux print sharing ? heinola Linux - Networking 4 02-21-2005 06:25 AM
OfficeJet G85, CUPS Web based Admin test print works, lpr/lp dose not. ptal-print OK. NLR Linux - Hardware 2 09-20-2004 02:59 PM


All times are GMT -5. The time now is 06:52 AM.

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