LinuxQuestions.org
Help answer threads with 0 replies.
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
  Search this Thread
Old 01-25-2011, 06:25 PM   #1
kern68
Member
 
Registered: Jun 2010
Distribution: Fedora, Ubuntu, CentOS, OpenSUSE
Posts: 47

Rep: Reputation: 0
Ubuntu printer unable to share to XP


There is a printer connected to my Ubuntu box that I would like to share with XP users on my home network. When I browse for a network printer in XP the Ubuntu box is displayed, but does not display the connected printer.

I added the following lines to cupsd.conf:
Port 631
Listen /var/run/cups/cups.sock

and then restarted cups with:
sudo /etc/init.d/cups restart

I have also set ufw to allow incoming traffic through port 631 from each XP machine.

What have I overlooked?

Thank you for any suggestions. GeoK
 
Old 01-25-2011, 06:32 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,213

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
To share a linux printer to a windoze host, you will have to install and configure Samba server. You define the shared printer in /etc/samba/smb.conf . Once that is done, you have to add a remote printer in windoze. Of course you need the windoze driver for the linux printer in XP. I have never heard of a way to share a linux printer to a windoze client with just cups.

You can use cups only on linux systems to share printers among linux hosts.

Samba is not trivial to configure. Look in the Tutorials, networking section, for how to go about setting up a samba server.
 
Old 01-25-2011, 08:39 PM   #3
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
Quote:
Originally Posted by kern68 View Post
There is a printer connected to my Ubuntu box that I would like to share with XP users on my home network. When I browse for a network printer in XP the Ubuntu box is displayed, but does not display the connected printer.

I added the following lines to cupsd.conf:
Port 631
Listen /var/run/cups/cups.sock

and then restarted cups with:
sudo /etc/init.d/cups restart

I have also set ufw to allow incoming traffic through port 631 from each XP machine.

What have I overlooked?

Thank you for any suggestions. GeoK
I assume that the printer is located on the Linux Box......
and you want to access from windows...is this correct?

By running cups on you Linux box this can be done without the complication of Samba./
Make sure the printer is online and enter
http://localhost:631
just follow the menus to add a printer....
 
Old 01-29-2011, 12:50 PM   #4
kern68
Member
 
Registered: Jun 2010
Distribution: Fedora, Ubuntu, CentOS, OpenSUSE
Posts: 47

Original Poster
Rep: Reputation: 0
Using http://localhost:631 I could not get it to work. In xp, the server appears in the windows printer selection box, but no printers appear after making the selection.

Another interesting tidbit is that another Ubuntu box on my home network recognizes the printer and accepts it as a valid printer, but when attempting to print an authentication pop-up appears saying that "Authentication is required for printing document". It asked for a password with "none" to the left of the entry box. The log entry "192.168.0.3 - - [29/Jan/2011:13:13:23 -0500] "POST /printers/HEWLETT-PACKARD-DESKJET-990C HTTP/1.1" 200 515439 Print-Job client-error-not-authorized" is then posted to the CUPS access_log.

If CUPS is requesting authentication, would that prevent windows from displaying the printer? Also, where and how is authentication for CUPS set? I have seen the DefaultAuthType Basic entry in cups.conf and Basic seems to be the correct entry. But the question still remains, where is the authentication set?

Thank you for any help.
 
Old 01-29-2011, 02:31 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,676

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
It is possible for windows to use CUPS IPP protocol. At first glance I suspect cups is not configured to allow other computers access.
http://wiki.linuxquestions.org/wiki/Cups
http://www.owlfish.com/thoughts/wini...003-07-20.html
 
Old 01-31-2011, 05:34 PM   #6
kern68
Member
 
Registered: Jun 2010
Distribution: Fedora, Ubuntu, CentOS, OpenSUSE
Posts: 47

Original Poster
Rep: Reputation: 0
Thank you for the links. One of the links did provide me with a method (nmap) to verify that my port 631 was open, but I am still experiencing the same symptoms as described earlier.

Here is my cups.conf:

Code:
  LogLevel warn
  MaxLogSize 1m
  SystemGroup lpadmin
# Allow remote access
  Port 631
  Listen /var/run/cups/cups.sock
# Enable printer sharing and shared printers.
  Browsing On
  BrowseOrder allow,deny
  BrowseAllow all
  BrowseRemoteProtocols CUPS
  BrowseAddress @LOCAL
  BrowseLocalProtocols CUPS dnssd
  DefaultAuthType Basic
<Location />
# Allow shared printing and remote administration...
  Order allow,deny
  Allow From All
</Location>
<Location /printers/HEWLETT-PACKARD DESKJET 990C>
  Order Deny, Allow
  Allow From 127.0.0.1
  AuthType None
  Allow From All
</Location>
<Location /admin>
# Allow remote administration...
  Order allow,deny
  Allow all
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
# Allow remote access to the configuration files...
  Order allow,deny
  Allow all
</Location>
<Policy default>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
<Policy authenticated>
  <Limit Create-Job Print-Job Print-URI>
  AuthType Default
  Order deny,allow
</Limit>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
  AuthType Default
  Require user @SYSTEM
  Order deny,allow
    </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
      </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
      AuthType Default
      Require user @OWNER @SYSTEM
      Order deny,allow
        </Limit>
  <Limit All>
        Order deny,allow
          </Limit>
</Policy>
            MaxClients 3
Is there anything thats jumps out that would cause any issues?
 
  


Reply


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
How share printer (Epson LX-300+) from Windows XP to Ubuntu 8.10? SHENGTON Linux - Networking 4 03-19-2009 10:43 PM
Unable to share folders with Mac mini and Macbook on a home network with ubuntu 8.04 smcaro Linux - Newbie 4 11-24-2008 09:34 PM
Share printer between 2 Ubuntu Computers rmadd Linux - Networking 1 11-09-2007 03:51 AM
Share printer using Samba in Ubuntu depam Linux - Software 6 03-17-2006 05:57 AM
Trying to Share XP Printer to Ubuntu Harimwakairi Linux - Hardware 1 01-05-2006 01:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:37 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration