You are not logged in.

#1 2007-11-27 06:41:44

ghyspran
Member
Registered: 2006-03-16
Posts: 18
Website

Printer Sharing Failure (Arch->Arch)

Okay, I've got one of my boxes, the one the printer is directly connected to by USB, able to print (HP Deskjet 5940, printer name under CUPS HP5940), and now I need to get my other computer to be able to print across the network.  I've read the wiki entry, but I totally failed at setting it up.  I don't exactly understand how it works.  I've also tried random messing around with the CUPS web UI, naturally, that did nothing for me.  I think I have my config files correct, but I don't know.  If I run lpq on my client box, I get "error - no default destination available."  I really don't know what I'm doing.

Client Box: 192.168.1.43, cerberus
Server Box: 192.168.1.19, apollo

/etc/hosts

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1        localhost.olympus    localhost cerberus
192.168.1.43    cerberus.olympus cerberus
192.168.1.19    apollo.olympus apollo

# End of file

/etc/cups/cupsd.conf (server box)

#
# "$Id: cupsd.conf,v 1.1 2006/07/06 13:11:10 tpowa Exp $"
#
#   Sample configuration file for the Common UNIX Printing System (CUPS)
#   scheduler.  See "man cupsd.conf" for a complete description of this
#   file.
#

# Disable ssl by default, you have to generate own certs to use this feature eg. by this command:
# openssl req -new -x509 -keyout /etc/cups/ssl/server.key -out /etc/cups/ssl/server.crt -days 365 -nodes
# for other certs please refer to openssl manpage.
# Setting Encryption to not required by default
DefaultEncryption IfRequested


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

# Administrator user group...
SystemGroup sys root

# Only listen for connections from the local machine.
Listen localhost:631
Listen 192.168.1.19:631
# Socket disabled by default it makes KDE fail on CUPS
# Listen /var/run/cups/cups.sock
# To allow remote connections add for example
# Listen <yourserverip>:631

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

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

# Restrict access to the server...
# By default only localhost connections are possible
<Location />
  Order Deny,Allow
  Deny From All
  Allow From 127.0.0.1
  Allow From 192.168.1.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
  # Encryption disabled by default
  #Encryption Required
  Order deny,allow
  Deny From All
  Allow localhost
  Allow 192.168.1.43
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  Order allow,deny
  Allow localhost
  Allow 192.168.1.43
</Location>

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

  # 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>

#
# End of "$Id: cupsd.conf,v 1.1 2006/07/06 13:11:10 tpowa Exp $".
#

/etc/cups/client.conf (client box, file was nonexistant before, so I dunno if it's missing anything)

ServerName 192.168.1.19

Offline

#2 2007-11-27 09:03:21

pooflinger
Member
From: Sweden
Registered: 2007-10-05
Posts: 53

Re: Printer Sharing Failure (Arch->Arch)

I use a similar setup that works very well. I've never had to manually edit my cups.conf, the webtool has been rather effective. Anyways,

Start off by configuring cups on your server. Make sure to go thru all the options at "localhost:631" in your browser. You'll want to "publish" your printer, aswell as "set as default" in the "Printer" section. Check to see that all is as it should in the "administration" section. Try printing a document from an app to see that local printing works. Do this as a user, not root. You might need to add your username to a group such as "printing" or similar, more about this in the wiki.

Next run the cups webtool on your client. Add a new printer and set it up as you did on your server with one exception: The printer device URI. In my case this is "ipp://192.168.0.2:631/printers/PSC750". My server is debian, but I suspect that this holds true for Arch as well. The "PCS750" is of course the name of my printer as configured on my server.

This should be sufficient. If things don't work see /var/log/cups/... for debugging. Any problems are most likely caused by privilege insufficiency. You may need to study how user/group privilege is governed on linux, more specifically you might need to allow your client to access the printing facilities of your server by granting the printing user more power on your server.

Hope someone can fill in the specifics of this smile

Offline

#3 2007-11-28 01:19:41

ghyspran
Member
Registered: 2006-03-16
Posts: 18
Website

Re: Printer Sharing Failure (Arch->Arch)

AFAIK, everything seems right, but it doesn't work

/etc/cups/error_log - debug mode, upon [failure of] sending a test page to the printer remotely

D [27/Nov/2007:15:49:49 -0800] cupsdReadClient: 7 GET /printers/HP5940?op=print-test-page HTTP/1.1
D [27/Nov/2007:15:49:49 -0800] cupsdAuthorize: Authorized as root using Basic
D [27/Nov/2007:15:49:49 -0800] [CGI] /usr/lib/cups/cgi-bin/printers.cgi started - PID = 12076
I [27/Nov/2007:15:49:49 -0800] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=12076)
D [27/Nov/2007:15:49:49 -0800] cupsdSendCommand: 7 file=8
D [27/Nov/2007:15:49:49 -0800] cupsdAcceptClient: 10 from localhost:631 (IPv4)
D [27/Nov/2007:15:49:49 -0800] cupsdReadClient: 10 POST /printers/HP5940 HTTP/1.1
D [27/Nov/2007:15:49:49 -0800] cupsdAuthorize: No authentication data provided.
D [27/Nov/2007:15:49:49 -0800] Print-Job ipp://localhost:631/printers/HP5940
D [27/Nov/2007:15:49:49 -0800] add_job: requesting-user-name="root"
D [27/Nov/2007:15:49:49 -0800] Adding default job-sheets values "none,none"...
I [27/Nov/2007:15:49:49 -0800] [Job 10] Adding start banner page "none".
D [27/Nov/2007:15:49:49 -0800] Discarding unused job-created event...
I [27/Nov/2007:15:49:49 -0800] [Job 10] Adding job file of type application/postscript.
I [27/Nov/2007:15:49:49 -0800] [Job 10] Adding end banner page "none".
I [27/Nov/2007:15:49:49 -0800] [Job 10] Queued on "HP5940" by "root".
D [27/Nov/2007:15:49:49 -0800] [Job 10] hold_until = 0
D [27/Nov/2007:15:49:49 -0800] cupsdProcessIPPRequest: 10 status_code=0 (successful-ok)
D [27/Nov/2007:15:49:49 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:49 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:49 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:49 -0800] cupsdCloseClient: 10
D [27/Nov/2007:15:49:49 -0800] PID 12076 (/usr/lib/cups/cgi-bin/printers.cgi) exited with no errors.
D [27/Nov/2007:15:49:51 -0800] cupsdReadClient: 7 GET /printers/HP5940 HTTP/1.1
D [27/Nov/2007:15:49:51 -0800] cupsdAuthorize: Authorized as root using Basic
D [27/Nov/2007:15:49:51 -0800] [CGI] /usr/lib/cups/cgi-bin/printers.cgi started - PID = 12077
I [27/Nov/2007:15:49:51 -0800] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=12077)
D [27/Nov/2007:15:49:51 -0800] cupsdSendCommand: 7 file=8
D [27/Nov/2007:15:49:51 -0800] cupsdAcceptClient: 10 from localhost:631 (IPv4)
D [27/Nov/2007:15:49:51 -0800] cupsdReadClient: 10 POST / HTTP/1.1
D [27/Nov/2007:15:49:51 -0800] cupsdAuthorize: No authentication data provided.
D [27/Nov/2007:15:49:51 -0800] CUPS-Get-Default
D [27/Nov/2007:15:49:51 -0800] CUPS-Get-Default client-error-not-found: No default printer
D [27/Nov/2007:15:49:51 -0800] cupsdProcessIPPRequest: 10 status_code=406 (client-error-not-found)
D [27/Nov/2007:15:49:51 -0800] [CGI] show_printer(http=0x8072788, printer="HP5940")
D [27/Nov/2007:15:49:51 -0800] cupsdReadClient: 10 POST / HTTP/1.1
D [27/Nov/2007:15:49:51 -0800] cupsdAuthorize: No authentication data provided.
D [27/Nov/2007:15:49:51 -0800] Get-Printer-Attributes ipp://localhost/printers/HP5940
D [27/Nov/2007:15:49:51 -0800] cupsdProcessIPPRequest: 10 status_code=0 (successful-ok)
D [27/Nov/2007:15:49:51 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:51 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:51 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:51 -0800] cupsdReadClient: 10 POST / HTTP/1.1
D [27/Nov/2007:15:49:51 -0800] cupsdAuthorize: No authentication data provided.
D [27/Nov/2007:15:49:51 -0800] Get-Jobs ipp://localhost:631/printers/HP5940
D [27/Nov/2007:15:49:51 -0800] cupsdProcessIPPRequest: 10 status_code=0 (successful-ok)
D [27/Nov/2007:15:49:51 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:51 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:51 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:51 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:51 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:51 -0800] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [27/Nov/2007:15:49:51 -0800] cupsdCloseClient: 10
D [27/Nov/2007:15:49:51 -0800] PID 12077 (/usr/lib/cups/cgi-bin/printers.cgi) exited with no errors.
D [27/Nov/2007:15:50:54 -0800] cupsdCloseClient: 7

Offline

Board footer

Powered by FluxBB