• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: [SOLVED] Trouble using the Plug as a print server  (Read 2922 times)
feffer
Jr. Member
**

Karma: -1
Posts: 56


View Profile
« on: June 02, 2010, 05:41:16 PM »

I have cups installed on the Plug (running debian) and a powered hub attached to the Plug. A hdd and a usb printer are attached to the hub. I altered the /etc/cupsd.conf to allow remote access via Port 631. From a client machine I brought up the CUPS web interface with "http:IP-of-Plug:631" Then I added the usb printer, set it to "share" and printed a test page. So far so good...the test page worked fine.

However, I cannot seem to get it to work from client machines on my network! It seems easy to add the printer using the ipp addressing, but it does not work. A test print page shows: "Unable to get printer status (Bad Request)!" I know I must be missing something basic, but not sure how to proceed??

thx,
feffer
« Last Edit: June 06, 2010, 01:32:42 PM by feffer » Logged

two9er
Jr. Member
**

Karma: 10
Posts: 51


View Profile
« Reply #1 on: June 02, 2010, 05:54:34 PM »

I'm currently running a cups print server with sucess across my network. My cupsd.conf file if it may help:
Code:
sheevaplug-debian:/etc/cups# cat cupsd.conf
#
#
#   Sample configuration file for the Common UNIX Printing System (CUPS)
#   scheduler.  See "man cupsd.conf" for a complete description of this
#   file.
#

# Log general information in error_log - change "info" to "debug" for
# troubleshooting...
LogLevel warning

# Administrator user group...
SystemGroup lpadmin root jbarnes


# Only listen for connections from the local machine.
Listen *:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Allow All
  Order allow,deny
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Allow All
  Order allow,deny
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Allow All
  Order allow,deny
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <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>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    #Require user @SYSTEM
    Allow All
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <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>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

#
#

HTH, jim
Logged

Just plugging away! GuruPlug Server Plus, 1TB esata hd, 8GB microSD (rfs)

feffer
Jr. Member
**

Karma: -1
Posts: 56


View Profile
« Reply #2 on: June 02, 2010, 08:37:44 PM »

thx for the quick reply, Jim. I tried your cupsd.conf (with mods for me) but still no joy. I have a feeling it's some sort of connectivity or permissions problem. I'm using the ipp network protocol; "ipp://IP-of-Plug:631/printers/HP5550" and that seems right. I used something similar on an NSLU2 w/o problem. The local client machines seem to "see" the share, but find it "inaccessible".

thx,
feffer
Logged

feffer
Jr. Member
**

Karma: -1
Posts: 56


View Profile
« Reply #3 on: June 03, 2010, 06:01:00 PM »

After some delay, I got this working. There are some gotchas' so I'll mention these for others who might have issues. The cupsd.conf file posted by two9er is basically good, but cups balked when I tried to restart it on my debian squeeze Plug. CUPS may be doing some transitioning. Seems like it anyway. I got it working by copying cupsd.conf.default to cupsd.conf and then altering that file with two9er's edits. The default file has several stanzas added to the bottom where the posted one leaves off. They are needed to keep CUPS happy, on my system at least. After this, things worked normally.

Again for others who might be trying to do this, here's the process I used.

1. Get the /etc/cups/cupsd.conf file properly set up as mentioned above. Do this first, since you
    won't be able to get cups web access from your client machine unless you allow it in cupsd.conf
2. Maker sure your printer, usb cables etc are all attached securely and in good working order
    It might be a good idea to check it all out directly attached to your PC/Mac if you haven't already!
    If the hardware doesn't all work directly, you'll be endlessly frustrated! After getting #1 done, I had
    a loose usb cable from moving the printer around. I caught it quickly, but it could have caused grief!
3. Use the cups web interface to add your usb printer to the Plug. Use http://IP-of-your-Plug:631
4. Go to the admin page and make sure that your printer will be shared
5. Print the test page after adding the printer -- that shows that printing directly from the Plug works.
6. Now you can set up printing on your local machine. There are several ways to do this...
7. I used "ipp" My local machine gets something like "ipp://192.168.5.87:631/printers/name-of-printer"
    It's a good idea to use IP numbers rather than a name -- easier when guests come over w/laptops
    You can go to the cups web interface for your client machine with: "http:localhost:631"
    The ipp address is added there. The /printers/xxx part is a default debian printer queue.
    Use the same name for the printer here that you used when adding it to the Plug.
    If you use a Mac and add the printer there, the "ipp://IP-of-Plug:631" goes on one line
    and "/printers/name-of-printer" goes on the second queue line. All should work now!
8. Its even easier on a linux client machine. The Plug printer was automagically discovered and easily
    enabled. I didn't try it on Windows, but it should be fairly straight-forward as well. Several years ago,
    though I had a problem getting WinXP to recognize a very old network connected laser-writer. I finally
    got it to work by installing it as a "local" printer. So if your Win machine resists, try that work-around.

Regards,
feffer
« Last Edit: June 04, 2010, 11:20:30 AM by feffer » Logged

two9er
Jr. Member
**

Karma: 10
Posts: 51


View Profile
« Reply #4 on: June 04, 2010, 07:03:47 AM »

feffer, I'd be interested in seeing what my cupsd.conf file is missing:
Quote
The default file has several stanzas added to the bottom where the posted one leaves off.

We may indeed have different cupsd.conf.default files. Here's the last bit of mine:
Code:
sheevaplug-debian:~# tail /etc/cups/cupsd.conf.default
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

#
# End of "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $".
#

Jim
Logged

Just plugging away! GuruPlug Server Plus, 1TB esata hd, 8GB microSD (rfs)

feffer
Jr. Member
**

Karma: -1
Posts: 56


View Profile
« Reply #5 on: June 04, 2010, 11:05:17 AM »

OK, here are the extra stanzas with my comments:
Code:
## found at the top of the file - maybe used when the file is updated by apt?
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"

###################################
## two9ers stanzas (modify as needed) inserted here...
###################################

## Stuff from here down not in two9ers file, but seem necessary for cups to function on my
## debian squeeze system. Rather than create my config file by cutting and pasting, I copied
## the entire (original) cupsd.conf.default file, and went through it stanza by stanza modifying
## it using two9er's file as a model. Mostly, opening up permissions with "Allow All"

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <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>

  # All administration operations require an administrator to authenticate...
  <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>

  # All printer operations require a printer operator to authenticate...
  <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>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

#
# End of "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $".
#
Since your file works in your system, two9er, you're not really missing anything! These last stanzas add some sort of functionality, but I'm not sure just what. Also there may be some other differences between the previous stanzas, that caused cups to balk on my system. Once I got it working, I didn't try to break it again to isolate the issue  Wink

Funny, two years ago when I used the Linksys NSLU2 as a print server (for the same HP printer), the whole process was easier. I didn't even have to manually touch cupsd.conf. I'm familiar with modifying some linux files, but not this cups one, so I resisted messing with it.

So thx again for the help, two9er -- that got me over the top.

Regards,
feffer
Logged

Pages: [1]
Print
Jump to: