You are not logged in.

#1 2009-02-04 11:57:08

Convergence
Member
Registered: 2005-07-02
Posts: 377

Linux to linux print sharing

I want to share my (already working via cups) printer with my other computer over the LAN.  I followed the wiki, but it isn't working.  I even read the gentoo wiki as well for a different perspective,but it said almost exactly the same thing.  Eventually, I abandoned all reason, and started using the web interface of both computers to try to get it to work, and something I did created a new file: /etc/cups/cupsd.conf.O on the host (The computer directly connected to the printer).

I'll share all three config files, and maybe someone can point out a problem or two.

On the host:
/etc/cups/cupsd.conf:

DefaultEncryption IfRequested
LogLevel info
SystemGroup sys root
# Allow remote access
Port 631
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
DefaultAuthType Basic
<Location />
  Allow localhost
  Allow From 192.168.1.3
  Deny all
  Allow all
  # Allow shared printing and remote administration...
  Order allow,deny
  Allow all
</Location>
<Location /admin>
  Allow localhost
  # Allow remote administration...
  Order allow,deny
  Allow all
</Location>
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  Allow localhost
  # 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>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes 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-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
    AuthType Basic
    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>

/etc/cups/cupsd.conf.O

DefaultEncryption IfRequested
LogLevel info
SystemGroup sys root
# Allow remote access
Port 631
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
DefaultAuthType Basic
<Location />
  Allow localhost
  Allow From 192.168.1.3
  Deny all
  # Allow shared printing...
  Order allow,deny
  Allow all
</Location>
<Location /admin>
  Allow localhost
  # Restrict access to the admin pages...
  Order allow,deny
</Location>
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  Allow localhost
  # Restrict access to the configuration files...
  Order allow,deny
</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>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes 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-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
    AuthType Basic
    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>
/etc/cups/cupsd.conf.O (END)

On the client machine:
/etc/cups/client.conf

ServerName    192.168.1.2

On the Client computer, lpq gives "lpq: error - no default destination available."


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#2 2009-02-04 14:48:35

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: Linux to linux print sharing

Have you added the printer on the client machine? (/etc/cups/printers.conf)


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#3 2009-02-04 14:50:26

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: Linux to linux print sharing

I prefer the GUI way sometimes. CUPS is one of this times. So, in your prefered browser: http://localhost:631

Update: Oh, and when you have to choose the printer, use an address like this: http://your_computer_that_acts_as_a_printserver/printer/your_printer_name_as_defined_on_the_computer_that_acts_as_a_printserver

Hope this helps.

Last edited by ckristi (2009-02-04 15:30:20)


In love I believe and in Linux I trust

Offline

#4 2009-02-04 16:34:14

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Linux to linux print sharing

On the host you should also have a file called /etc/cups/printers.conf - Your printer should have 'Shared Yes'. This is mine:

<DefaultPrinter MFC8860DN>
Info Brother MFC-8860DN
Location Kantoor Dendermonde
DeviceURI lpd://<IP-ADDRESS>/binary_p1
State Idle
StateTime 1227888727
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>

Last edited by zenlord (2009-02-04 16:34:46)

Offline

#5 2009-02-04 20:47:32

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: Linux to linux print sharing

OK, I added the printer on to the client machine via the cups browser interface, and everything seems to be good, except that when I click "print test page"  jobs just get added to my queue, and never print.  Then I get an error:
"NameRemotePrinter (Default Printer) "Unable to get printer status (Forbidden)!".  Also, it asks me to authenticate via firefox' login prompt, and I'm not sure what to do there.  Am I supposed to log in with my users that are on the local (client) box, or users on the host box?  Is there a way to disable authentication completely?  As long has someone has physical access to my computers, I want them to be able to print.


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#6 2009-02-04 20:57:20

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Linux to linux print sharing

i use avahi to print between linux machines. if you are interest how to do that ask me. just 1 click and your done smile

Last edited by wonder (2009-02-04 20:58:16)


Give what you have. To someone, it may be better than you dare to think.

Offline

#7 2009-02-04 21:23:58

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: Linux to linux print sharing

@Convergence: You should enter root as a username, and root's password (for the localhost).

Last edited by ckristi (2009-02-04 21:24:15)


In love I believe and in Linux I trust

Offline

#8 2009-02-04 21:55:17

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: Linux to linux print sharing

Ok, wonder, I want to know how to do that.  I just enabled avahi on both systems, and enabled the hostname resolution service.  I don't know if i was supposed to or not, but I want this to work.  Never really knew what avahi was until now.


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#9 2009-02-04 22:47:33

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Linux to linux print sharing

go on the machine where the printer is connected. type http://localhost:631/admin/ and check "Share published printers connected to this system" and "Allow printing from the Internet" and click on Change Settings. you need to type on username root and then the password for root on that machine.  next you need to install cups on the machine from the lan and start cups. now the printer will apper on that machine


Give what you have. To someone, it may be better than you dare to think.

Offline

#10 2009-02-05 00:47:30

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: Linux to linux print sharing

Thanks guys, its working.


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

Board footer

Powered by FluxBB