Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running Ubuntu 11.10. I am trying to setup a new printer but when I go to localhost:631/admin it won't let me enter any of the options. CUPS does not ask me for a username and password. If I click on any of the menu items in the admin page it just reverts back to the same page.
I have uninstalled and re-installed cups several times to try and correct the problem, but no change. I even did a complete system re-install in case there was a configuration file somewhere that I had missed.
I have another computer, with the same operating system, on the same network that can acess the printer with no problems.
That is exactly the point. The login dialogue doesn't show up when I attempt any of the admin functions. I am assuming that is why I can't make changes. So how do I change that?
I have tried opening CUPS both ways, as a user and by starting Firefox with sudo. Still can't get in. The way CUPS should work is that anytime you want to do Admin functions it will ask for your username and password, but on this machine it doesn't.
@David
The Ubuntu printer config. tool doesn't do much. As far as I can tell it only lets your system know there is a printer connected to the network. AFAIK you have to use CUPS to to actually do any configuration, set up default options, etc. This is absolutely necessary in my case as I do most of my printing from LibreOffice. Unfortunately, LO and its predecessor OpenOffice has a bug in it that the developers haven't gotten around to fixing yet. LO uses the printer defaults to print, i.e. you can't change them from the printer dialogue in LO. The only workaround I know for this is to set up two or more instances of the same printer, each one configured with a preferred set of options. It makes for a lot of work but at least you can print something the way you want. But you have to do all that using CUPS, hence the headache I am experiencing.
Any other ideas will be welcome. Thanks for your help so far.
Just a flash...you're running the Cusp Daemon (cupsd), so you're in escence running a webserver. Are you "belssed" with more than one box? If so, try to access that machine ans see if you can get on to the cups page. Look up the processlist, I suspect cupsd to be in there.
The conf file is set up so the web interface has restricted access. In the conf file (typically /etc/cups/cupsd.conf), try to edit it, this should be in there:
Quote:
Order deny, allow
Deny fro all
Allow from 127.0.0.1
I am unsure exactly where the lines of code you suggested should go in the file. Here is my /etc/cups/cupsd.conf file. I have compared the same file from both machines and they are identical, except one works and the other doesn't.
Quote:
#
#
# 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
# Deactivate CUPS' internal logrotating, as we provide a better one, especially
# LogLevel debug2 gets usable now
MaxLogSize 0
# 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 Off
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd
BrowseAddress @LOCAL
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Web interface setting...
WebInterface Yes
# Restrict access to the server...
<Location />
Order allow,deny
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
</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/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
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 Cancel-Jobs 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/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Default
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 Cancel-Jobs 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>
Yes, lpadmin is a valid group on both machines and I am a member of it.
I added those two lines, that you suggested, to the cupsd.conf file on the machine that doesn't work and then restarted, but unfortunately I still can't access the cups admin functions.
Thx for your patience and help in dealing with this problem.
And here is the cups error log which is saying something about a dbus problem:
Quote:
W [26/Feb/2012:14:50:11 -0800] failed to CreateProfile: org.freedesktop.DBus.Error.NoReplyid not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
W [26/Feb/2012:19:45:42 -0800] failed to CreateProfile: org.freedesktop.DBus.Error.NoReplyid not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
W [27/Feb/2012:10:23:50 -0800] failed to CreateProfile: org.freedesktop.DBus.Error.NoReplyid not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
I reinstalled dbus but that didn't make any difference. The log says it is possibly a network connection problem, but I can ping the printer successfully, and I have replaced the cable just to be sure, but still no joy.
Could you try to :
go to http://localhost:631/admin
click on add printer
click on view access log and error log
Just to see if something change
Also, did you try different web browsers to access cups ?
There were no changes in the logs when I tried to add printer.
Ahaa, when I tried to access admin functions from Chromium I got the proper request for username and password. Does this mean there is something in Firefox that is screwed up?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.