Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] CUPS Web Interface
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
NTICompass
Apprentice
Apprentice


Joined: 11 Jun 2008
Posts: 171
Location: /home/nticompass/

PostPosted: Sun Jul 26, 2009 12:21 am    Post subject: [SOLVED] CUPS Web Interface Reply with quote

I can access the CUPS web interface (http://localhost:631/) just fine, but I am having problems accessing the /admin or the /printers page.

'Add printer', and 'jobs' work fine. But, 'manage printers/server' and 'administration' don't. Firefox just says "Waiting for localhost".

What is wrong?


Last edited by NTICompass on Wed Jul 29, 2009 1:00 am; edited 1 time in total
Back to top
View user's profile Send private message
rsa4046
l33t
l33t


Joined: 07 Feb 2005
Posts: 660
Location: The Big H, a bit SSW

PostPosted: Sun Jul 26, 2009 10:54 am    Post subject: Reply with quote

Not sure which browser you are using, but at some point you should get a pop-up window
Code:
Authentication Required
A username and password are being requested by http://localhost:631. The site says: "CUPS"
Does this not happen?
Back to top
View user's profile Send private message
NTICompass
Apprentice
Apprentice


Joined: 11 Jun 2008
Posts: 171
Location: /home/nticompass/

PostPosted: Sun Jul 26, 2009 4:48 pm    Post subject: Reply with quote

rsa4046 wrote:
Not sure which browser you are using, but at some point you should get a pop-up window
Code:
Authentication Required
A username and password are being requested by http://localhost:631. The site says: "CUPS"
Does this not happen?

I'm using Firefox (3.0.11), and no that authorization window does not appear.
Back to top
View user's profile Send private message
rsa4046
l33t
l33t


Joined: 07 Feb 2005
Posts: 660
Location: The Big H, a bit SSW

PostPosted: Sun Jul 26, 2009 6:15 pm    Post subject: Reply with quote

Can you check your /etc/cups/cupsd.conf file? Here is mine for comparison:
Code:
#                         
# "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $"
#                                                     
#   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 info                                                       

# Administrator user group...
SystemGroup lpadmin
                                                                                                                 
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

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

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

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

# Restrict access to the admin pages...
<Location /admin>
  Encryption Required
  AuthType Basic
  AuthClass System
  Allow From 127.0.0.1
  Order allow,deny
  Deny From All
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  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
    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>

#
# End of "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $".
#
If you make changes to yours, be sure to restart cupsd
Code:
# /etc/init.d/cupsd restart


Edit: corrected file location
Back to top
View user's profile Send private message
NTICompass
Apprentice
Apprentice


Joined: 11 Jun 2008
Posts: 171
Location: /home/nticompass/

PostPosted: Sun Jul 26, 2009 8:05 pm    Post subject: Reply with quote

I edited my cupsd.conf. Now it asks me for a password when I click on 'Administration'. Still doesn't load.

/printers /classes /admin nothing

Though I can get to the 'Add Printer' screen...

What else could be wrong?

My cupsd.conf looks like this:
Code:

LogLevel info
HostNameLookups Double
SystemGroup lpadmin

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

# Disable printer sharing and shared printers.
Browsing Off
DefaultAuthType Basic

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

# Restrict access to the admin pages...
<Location /admin>
  Encryption Required
  AuthType Basic
  AuthClass System
  Allow From 127.0.0.1
  Order allow,deny
  Deny From All
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  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 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>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
 
  <Limit All>
    Order deny,allow
  </Limit>
 
</Policy>
Back to top
View user's profile Send private message
rsa4046
l33t
l33t


Joined: 07 Feb 2005
Posts: 660
Location: The Big H, a bit SSW

PostPosted: Mon Jul 27, 2009 8:57 am    Post subject: Reply with quote

NTICompass wrote:
I edited my cupsd.conf. Now it asks me for a password when I click on 'Administration'. Still doesn't load.

/printers /classes /admin nothing

Though I can get to the 'Add Printer' screen...

What else could be wrong?

Hmmm, not sure. Are you a member of the lp group? As user, just type groups on a command line to see your group membership (if you need to add your user to a group, do, as root: gpasswd -a USER GROUP). I'm not sure why this should matter however, once authenticated as root at the web login. What version of cups are you running? What does 'emerge -vp cups' report?
Back to top
View user's profile Send private message
rsa4046
l33t
l33t


Joined: 07 Feb 2005
Posts: 660
Location: The Big H, a bit SSW

PostPosted: Mon Jul 27, 2009 9:06 am    Post subject: Reply with quote

Also (sorry for the double post): Does
Code:
# tail /var/log/cups/page_log
record your login? What about
Code:
# tail /var/log/cups/access_log
Back to top
View user's profile Send private message
NTICompass
Apprentice
Apprentice


Joined: 11 Jun 2008
Posts: 171
Location: /home/nticompass/

PostPosted: Mon Jul 27, 2009 7:03 pm    Post subject: Reply with quote

I am not in the lp group.

tail /var/log/cups/access_log
Code:

localhost - - [27/Jul/2009:14:51:13 -0400] "GET /images/bottom-right.gif HTTP/1.1" 200 123 - -
localhost - - [27/Jul/2009:14:51:13 -0400] "GET /images/tab-left.gif HTTP/1.1" 200 46 - -
localhost - - [27/Jul/2009:14:51:13 -0400] "GET /images/button-manage-printers.gif HTTP/1.1" 200 508 - -
localhost - - [27/Jul/2009:14:51:13 -0400] "GET /images/happy.gif HTTP/1.1" 200 3522 - -
localhost - - [27/Jul/2009:14:51:13 -0400] "GET /images/button-manage-server.gif HTTP/1.1" 200 493 - -
localhost - - [27/Jul/2009:14:51:14 -0400] "GET /printers/ HTTP/1.1" 200 0 - -
localhost - - [27/Jul/2009:14:51:17 -0400] "GET /admin/ HTTP/1.1" 401 0 - -
localhost - root [27/Jul/2009:14:51:22 -0400] "GET /admin/ HTTP/1.1" 200 0 - -
localhost - root [27/Jul/2009:14:57:59 -0400] "GET /admin/ HTTP/1.1" 200 0 - -
localhost - - [27/Jul/2009:14:58:01 -0400] "GET /printers/ HTTP/1.1" 200 0 - -
Back to top
View user's profile Send private message
NTICompass
Apprentice
Apprentice


Joined: 11 Jun 2008
Posts: 171
Location: /home/nticompass/

PostPosted: Wed Jul 29, 2009 12:56 am    Post subject: Reply with quote

tail /var/log/cups/error_log
Code:

W [28/Jul/2009:20:55:37 -0400] IP lookup failed - connection from localhost closed!
W [28/Jul/2009:20:55:37 -0400] IP lookup failed - connection from localhost closed!
W [28/Jul/2009:20:55:37 -0400] IP lookup failed - connection from localhost closed!
W [28/Jul/2009:20:55:37 -0400] IP lookup failed - connection from localhost closed!
W [28/Jul/2009:20:55:37 -0400] IP lookup failed - connection from localhost closed!
W [28/Jul/2009:20:55:37 -0400] IP lookup failed - connection from localhost closed!
W [28/Jul/2009:20:55:37 -0400] IP lookup failed - connection from localhost closed!
W [28/Jul/2009:20:55:37 -0400] IP lookup failed - connection from localhost closed!
E [28/Jul/2009:20:55:37 -0400] PID 26518 (/usr/libexec/cups/cgi-bin/admin.cgi) crashed on signal 9!
I [28/Jul/2009:20:55:37 -0400] Hint: Try setting the LogLevel to "debug" to find out more.
Back to top
View user's profile Send private message
NTICompass
Apprentice
Apprentice


Joined: 11 Jun 2008
Posts: 171
Location: /home/nticompass/

PostPosted: Wed Jul 29, 2009 1:01 am    Post subject: Reply with quote

FIXED IT!

removed Listen /var/run/cups/cups.sock from confd.conf
and removed ServerName /var/run/cups/cups.sock from client.conf
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum