Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Dec 2009 11:21:08 +0000
From:      David Southwell <david@vizion2000.net>
To:        freebsd-questions@freebsd.org
Cc:        Robert Huff <roberthuff@rcn.com>, Olivier Nicole <Olivier.Nicole@cs.ait.ac.th>, usleepless@gmail.com
Subject:   CUPS & laserjet 2200dn with Jetdirect 610N on network - one remaining problem
Message-ID:  <200912101121.08760.david@vizion2000.net>
In-Reply-To: <alpine.BSF.2.00.0912080846001.40967@wonkity.com>
References:  <200912081040.02500.david@vizion2000.net> <alpine.BSF.2.00.0912080846001.40967@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi All

Thank you everyone for your help as a result of combined efforts I have 
finally succeeded in getting cups the server to communicate with the printer 
and print. 
HOWEVER!!

One minor niggling problem remains. I cannot communicate with the cups 
management interface on http://localhost:631 due to password authentication 
failure. I try logging in as 'root' with correct root password in the login 
dialogue.

I altered the loglevel to debug and the output is at the end of the email.

It seems as though the cupsd is not receiving the input (probably due to some 
config error on my part!). I have tried using a number of different browsers 
but get the same result.

Prior to testing I did:

dns1# lppasswd -g wheel -a root
The standard cups error log showed
cupsdAuthorize: pam_start() returned 4 (system error)!

So I raised the loglevel to debug and got the results shown further down.

All the configuration has been done manually.
I restarted cupsd with:

dns1# /usr/local/etc/rc.d/cupsd restart
Stopping cupsd.
Starting cupsd.

 The HP JetDirect Configuration report includes the following info:
_______________________________
Model Number: J4169A
Firmware Version: L.20.24

Under TCP/IP we have:
Hostname: [mydevice]
Domain Name: [my_domain].[my_tld]
# The following all show correct entries:
Ip Address:
Subnet Mask:
Default Gateway:
DNS Server:
__________________________________
End of jetDirect config info:
____________________________________

 The beast is printing.
____________________________________________
Cups is running:

dns1# ps -aux |grep cupsd
root       40253  0.0  0.1 27956  5332  ??  Is    1:01PM   0:00.02 
/usr/local/sbin/cupsd -C /usr/local/etc/cups/cupsd.conf

dns1# cat /usr/local/etc/cups/cupsd.conf                                                                                       
#                                                                                                                              
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"                                                                        
#                                                                                                                              
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for 
a                                                
# complete description of this file.                                                                                           
#                                                                                                                              

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

# Administrator user group...
SystemGroup wheel            


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

# Show shared printers on the local network.
Browsing On                                 
BrowseOrder allow,deny                      
BrowseAllow all                             
BrowseLocalProtocols CUPS                   

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

# Restrict access to the server...
<Location />                      

Order Deny, Allow
Deny from All    
Allow from 127.0.0.1
Allow from  62.49.197.50
</Location>             

# Restrict access to the admin pages...
<Location /admin>                      
AuthType Default                       
Require user @SYSTEM                   
  Order Deny, Allow                    
Deny from All                          
Allow from 127.0.0.1                   
Allow from  62.49.197.50               
</Location>                            

# Restrict access to configuration files...
<Location /admin/conf>                     
  AuthType Default                         
  Require user @SYSTEM                     
Order Deny, Allow                          
Deny from All                              
Allow from 127.0.0.1                       
Allow from  62.49.197.50                   
  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 CUPS-Get-Document>      
    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 CUPS-Get-Devices>
    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>                                
    Require user @OWNER @SYSTEM                                           
    Order deny,allow                                                      
  </Limit>                                                                

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

# 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 $".
#
dns1#

Here is the output from /cups/error_log with loglevel changed to debug

# RESTART CUPS HERE:I [10/Dec/2009:11:06:07 +0000] Scheduler shutting down 
normally.
D [10/Dec/2009:11:06:07 +0000] Discarding unused server-stopped event...
D [10/Dec/2009:11:06:07 +0000] 
cupsdDeregisterPrinter(p=0x801f78800(LaserJet-2200), removeit=1)
X [10/Dec/2009:11:06:07 +0000] kevent() returned Bad file descriptor
I [10/Dec/2009:11:06:07 +0000] Saving job cache file 
"/var/cache/cups/job.cache"...
I [10/Dec/2009:11:06:07 +0000] Listening to ::1:631 (IPv6)
I [10/Dec/2009:11:06:07 +0000] Listening to 127.0.0.1:631 (IPv4)
I [10/Dec/2009:11:06:07 +0000] Listening to /var/run/cups.sock (Domain)
D [10/Dec/2009:11:06:07 +0000] cupsdDenyIP(loc=0x801f800a0(/), 
address=0:0:0:0, netmask=0:0:0:0)
D [10/Dec/2009:11:06:07 +0000] cupsdDenyIP(loc=0x801f80100(/admin), 
address=0:0:0:0, netmask=0:0:0:0)
D [10/Dec/2009:11:06:07 +0000] cupsdDenyIP(loc=0x801f80160(/admin/conf), 
address=0:0:0:0, netmask=0:0:0:0)
I [10/Dec/2009:11:06:07 +0000] Remote access is disabled.
D [10/Dec/2009:11:06:07 +0000] Added auto ServerAlias dns1.vizion2000.net
D [10/Dec/2009:11:06:07 +0000] Added auto ServerAlias dns1
I [10/Dec/2009:11:06:07 +0000] Loaded configuration file 
"/usr/local/etc/cups/cupsd.conf"
I [10/Dec/2009:11:06:07 +0000] Using default TempDir of /var/spool/cups/tmp...
I [10/Dec/2009:11:06:07 +0000] Configured for up to 100 clients.
I [10/Dec/2009:11:06:07 +0000] Allowing up to 100 client connections per host.
I [10/Dec/2009:11:06:07 +0000] Using policy "default" as the default!
I [10/Dec/2009:11:06:07 +0000] Full reload is required.
I [10/Dec/2009:11:06:07 +0000] Loaded MIME database from 
"/usr/local/share/cups/mime" and "/usr/local/etc/cups": 35 types, 40 
filters...
D [10/Dec/2009:11:06:07 +0000] Loading printer LaserJet-2200...
D [10/Dec/2009:11:06:07 +0000] load_ppd: Loading 
/var/cache/cups/LaserJet-2200.ipp...
D [10/Dec/2009:11:06:07 +0000] 
cupsdRegisterPrinter(p=0x801f78800(LaserJet-2200))
D [10/Dec/2009:11:06:07 +0000] load_ppd: Loading 
/var/cache/cups/LaserJet-2200.ipp...
D [10/Dec/2009:11:06:07 +0000] 
cupsdRegisterPrinter(p=0x801f78800(LaserJet-2200))
I [10/Dec/2009:11:06:07 +0000] Loading job cache file 
"/var/cache/cups/job.cache"...
D [10/Dec/2009:11:06:07 +0000] [Job 5] Loading from cache...
D [10/Dec/2009:11:06:07 +0000] [Job 6] Loading from cache...
D [10/Dec/2009:11:06:07 +0000] [Job 7] Loading from cache...
I [10/Dec/2009:11:06:07 +0000] Full reload complete.
I [10/Dec/2009:11:06:07 +0000] Cleaning out old temporary files in 
"/var/spool/cups/tmp"...
I [10/Dec/2009:11:06:07 +0000] Listening to ::1:631 on fd 6...
I [10/Dec/2009:11:06:07 +0000] Listening to 127.0.0.1:631 on fd 7...
I [10/Dec/2009:11:06:07 +0000] Listening to /var/run/cups.sock on fd 8...
I [10/Dec/2009:11:06:07 +0000] Resuming new connection processing...
D [10/Dec/2009:11:06:07 +0000] 
cupsdRegisterPrinter(p=0x801f78800(LaserJet-2200))
D [10/Dec/2009:11:06:07 +0000] Discarding unused server-started event...
D [10/Dec/2009:11:06:08 +0000] Report: clients=0
D [10/Dec/2009:11:06:08 +0000] Report: jobs=3
D [10/Dec/2009:11:06:08 +0000] Report: jobs-active=0
D [10/Dec/2009:11:06:08 +0000] Report: printers=1
D [10/Dec/2009:11:06:08 +0000] Report: printers-implicit=0
D [10/Dec/2009:11:06:08 +0000] Report: stringpool-string-count=266
D [10/Dec/2009:11:06:08 +0000] Report: stringpool-alloc-bytes=6352
D [10/Dec/2009:11:06:08 +0000] Report: stringpool-total-bytes=6088
D [10/Dec/2009:11:08:40 +0000] cupsdAcceptClient: 12 from localhost:631 (IPv4)
D [10/Dec/2009:11:08:40 +0000] Report: clients=1
D [10/Dec/2009:11:08:40 +0000] Report: jobs=3
D [10/Dec/2009:11:08:40 +0000] Report: jobs-active=0
D [10/Dec/2009:11:08:40 +0000] Report: printers=1
D [10/Dec/2009:11:08:40 +0000] Report: printers-implicit=0
D [10/Dec/2009:11:08:40 +0000] Report: stringpool-string-count=266
D [10/Dec/2009:11:08:40 +0000] Report: stringpool-alloc-bytes=6352
D [10/Dec/2009:11:08:40 +0000] Report: stringpool-total-bytes=6088
D [10/Dec/2009:11:08:40 +0000] cupsdReadClient: 12 GET / HTTP/1.1
D [10/Dec/2009:11:08:40 +0000] cupsdSetBusyState: Active clients
D [10/Dec/2009:11:08:40 +0000] cupsdAuthorize: No authentication data 
provided.
D [10/Dec/2009:11:08:40 +0000] cupsdSetBusyState: Not busy
D [10/Dec/2009:11:08:40 +0000] cupsdReadClient: 12 GET /cups.css HTTP/1.1
D [10/Dec/2009:11:08:40 +0000] cupsdSetBusyState: Active clients
D [10/Dec/2009:11:08:40 +0000] cupsdAuthorize: No authentication data 
provided.
D [10/Dec/2009:11:08:40 +0000] cupsdSetBusyState: Not busy
D [10/Dec/2009:11:08:40 +0000] cupsdReadClient: 12 GET /images/left.gif 
HTTP/1.1
D [10/Dec/2009:11:08:40 +0000] cupsdSetBusyState: Active clients
D [10/Dec/2009:11:08:40 +0000] cupsdAuthorize: No authentication data 
provided.
D [10/Dec/2009:11:08:40 +0000] cupsdAcceptClient: 14 from localhost:631 (IPv4)
D [10/Dec/2009:11:08:40 +0000] cupsdSetBusyState: Not busy
D [10/Dec/2009:11:08:40 +0000] cupsdAcceptClient: 13 from localhost:631 (IPv4)
D [10/Dec/2009:11:08:40 +0000] cupsdReadClient: 14 GET /images/sel.gif 
HTTP/1.1
D [10/Dec/2009:11:08:40 +0000] cupsdSetBusyState: Active clients
D [10/Dec/2009:11:08:40 +0000] cupsdAuthorize: No authentication data 
provided.
D [10/Dec/2009:11:08:40 +0000] cupsdAcceptClient: 16 from localhost:631 (IPv4)
D [10/Dec/2009:11:08:40 +0000] cupsdReadClient: 13 GET /images/cups-icon.png 
HTTP/1.1
D [10/Dec/2009:11:08:40 +0000] cupsdAuthorize: No authentication data 
provided.
D [10/Dec/2009:11:08:40 +0000] cupsdAcceptClient: 15 from localhost:631 (IPv4)
D [10/Dec/2009:11:08:40 +0000] cupsdReadClient: 16 GET /images/right.gif 
HTTP/1.1
D [10/Dec/2009:11:08:40 +0000] cupsdAuthorize: No authentication data 
provided.
D [10/Dec/2009:11:08:40 +0000] cupsdReadClient: 15 GET /images/unsel.gif 
HTTP/1.1
D [10/Dec/2009:11:08:40 +0000] cupsdAuthorize: No authentication data 
provided.
D [10/Dec/2009:11:08:40 +0000] cupsdSetBusyState: Not busy
D [10/Dec/2009:11:08:46 +0000] cupsdReadClient: 15 GET /admin HTTP/1.1
D [10/Dec/2009:11:08:46 +0000] cupsdSetBusyState: Active clients
D [10/Dec/2009:11:08:46 +0000] cupsdAuthorize: No authentication data 
provided.
D [10/Dec/2009:11:08:46 +0000] cupsdIsAuthorized: username=""
D [10/Dec/2009:11:08:46 +0000] cupsdSendHeader: 15 WWW-Authenticate: Basic 
realm="CUPS", trc="y"
D [10/Dec/2009:11:08:46 +0000] cupsdCloseClient: 15
D [10/Dec/2009:11:08:46 +0000] cupsdSetBusyState: Not busy
D [10/Dec/2009:11:08:59 +0000] cupsdReadClient: 16 GET /admin HTTP/1.1
D [10/Dec/2009:11:08:59 +0000] cupsdSetBusyState: Active clients
E [10/Dec/2009:11:08:59 +0000] cupsdAuthorize: pam_start() returned 4 (system 
error)!
D [10/Dec/2009:11:08:59 +0000] cupsdIsAuthorized: username=""
D [10/Dec/2009:11:08:59 +0000] cupsdSendHeader: 16 WWW-Authenticate: Basic 
realm="CUPS", trc="y"
D [10/Dec/2009:11:08:59 +0000] cupsdCloseClient: 16
D [10/Dec/2009:11:08:59 +0000] cupsdSetBusyState: Not busy
D [10/Dec/2009:11:13:44 +0000] Closing client 12 after 300 seconds of 
inactivity...
D [10/Dec/2009:11:13:44 +0000] cupsdCloseClient: 12
D [10/Dec/2009:11:13:44 +0000] Closing client 14 after 300 seconds of 
inactivity...
D [10/Dec/2009:11:13:44 +0000] cupsdCloseClient: 14
D [10/Dec/2009:11:13:44 +0000] Closing client 13 after 300 seconds of 
inactivity...
D [10/Dec/2009:11:13:44 +0000] cupsdCloseClient: 13
D [10/Dec/2009:11:13:44 +0000] Report: clients=0
D [10/Dec/2009:11:13:44 +0000] Report: jobs=3
D [10/Dec/2009:11:13:44 +0000] Report: jobs-active=0
D [10/Dec/2009:11:13:44 +0000] Report: printers=1
D [10/Dec/2009:11:13:44 +0000] Report: printers-implicit=0
D [10/Dec/2009:11:13:44 +0000] Report: stringpool-string-count=266
D [10/Dec/2009:11:13:44 +0000] Report: stringpool-alloc-bytes=6352
D [10/Dec/2009:11:13:44 +0000] Report: stringpool-total-bytes=6088



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912101121.08760.david>