"Unauthorized" error when adding printers through CUPS using Google Chrome in Ubuntu 18.04 LTS

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…


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!


Update to latest Ubuntu.

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