32

Update 2019-01-09: Please see answer below as there is a way to fix this with CUPS 2.2.8.

Update 2020-10-17: Upgrading from 18.04 LTS to 20.04 LTS will fix it as it upgrades the version of CUPS from 2.2.7 (which contains the bug) to version 2.3.1 which does not have the bug. Since some users may not be able to upgrade to 20.04 LTS right now this is still very valid for the 18.04 LTS users.


I have Ubuntu 18.04 LTS installed clean on this system. When I try to add a printer through CUPS 2.2.7 address of http://localhost:631 in the Chrome browser, I can't add the printer as I keep getting Unauthorized. It never asks for a login. How do I add my printer through CUPS using Google Chrome?

BTW, Firefox, Chromium and other browsers so far seem to work fine for adding a printer in CUPS 2.2.7. It appears to be a bug between CUPS 2.2.7 and Google Chrome.

Unauthorized: Enter your username and password or the root username and password to access this page. If you are using Kerberos…

4
  • Why is this question closed? CUPS is broken, and this question is quite valid! Dec 16, 2018 at 13:13
  • @YanickRochon We have reopened this question and I have added info below in the answer.
    – Terrance
    Jan 9, 2019 at 18:39
  • 1
    For people stumbling upon this when searching the error: just use Firefox. Jan 3, 2021 at 13:03
  • For other people coming across this: the Vivaldi browser also has this problem - as @MartijnCourteaux says, try Firefox
    – pkeller
    Mar 22, 2021 at 16:49

4 Answers 4

41

Update 2019-01-09: I have found that CUPS 2.2.8 works without a problem with Google Chrome in Ubuntu 18.04. I downloaded and installed it from https://launchpad.net/ubuntu/+source/cups/2.2.8-5ubuntu1.2

Please note that the bug for CUPS 2.2.7 is filed at: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1769893


CUPS 2.2.8 installation steps

Run all the following from a terminal window.

Install the prerequisites:

sudo apt install autoconf build-essential libavahi-client-dev \
    libgnutls28-dev libkrb5-dev libnss-mdns libpam-dev \
    libsystemd-dev libusb-1.0-0-dev zlib1g-dev

Download CUPS 2.2.8 and extract it and enter the new directory created:

cd /tmp
wget -c https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/cups/2.2.8-5ubuntu1.2/cups_2.2.8.orig.tar.gz
tar zxvf cups_2.2.8.orig.tar.gz
cd cups-2.2.8

Run the configure, make and make install:

./configure
make
sudo make install

You might want to put a hold on CUPS so it doesn't update back to 2.2.7 which still has the issue with unauthorized:

sudo apt-mark hold cups

Then all you should have to do is restart the cups.service:

systemctl restart cups.service

Check if the service is running:

systemctl status cups.service

If CUPS fails to restart, reinstall the daemon then restart the service again:

sudo apt install --reinstall cups-daemon
systemctl restart cups.service

Then access in Google Chrome http://localhost:631

The CUPS homepage might show 2.2.7 still, but try clicking on Administration and it should show 2.2.8.

enter image description here

Hope this helps!

12
  • 1
    I always had to use a different browser to resolve this issue. Great information. Upvoting for sure. May 6, 2018 at 18:06
  • 2
    Yes this seems to work but I can't simply change the printer options. I am given back the page "Not authorized" even though I can add printers !!!
    – solsTiCe
    May 8, 2018 at 10:03
  • 1
    Well, I used gnome-control-center to do that finally
    – solsTiCe
    May 8, 2018 at 10:14
  • @solsTiCe Yeah, I think that is a bug between the two. I can't do the administration itself of the printer either. However, I have found that when I add the printer through CUPS this way regardless of the browser, apps in Wine will actually see and use the printer.
    – Terrance
    May 8, 2018 at 13:05
  • 2
    Using Firefox works.
    – jrennie
    Dec 9, 2018 at 19:27
3

I came across this solution when I was having the problem "in general" (not a browser specific issue) and the thing that ended up working for me was to add my user to the lpadmin group:

sudo usermod -aG lpadmin <USERNAME>

and then reboot.

1

Update to latest Ubuntu.

For me,this issue was solved when I updated Ubuntu from 18.04 LTS to 20.04 LTS.

0

You may try Chromium which open-source version of Chrome:

sudo apt install chromium-browser

It worked like a charm in my case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .