Categories
App Reviews News Tips Tutorials

CUPS – Forbiden – Ubuntu 13.10

Wow, I haven’t had a hard time with Ubuntu 13.10 until I bought a new laser printer from Lexmark. The printer was fine and I downloaded all the required files from lexmark.com, but an error pop out from the Ubuntu Software Center stating that the package was malformed. Anyway, I submitted the error to Lexmark and try again with Linux community options. Then I was instructed to use CUPS, which can be accessed typing http://localhost:631 in your browser’s address bar.

As stated in the overview page: “CUPS is the standards-based, open source printing system developed by Apple Inc. for OS® X and other UNIX®-like operating systems. CUPS is the software you use to print from applications like the web browser you are using to read this page. It converts the page descriptions produced by your application (put a paragraph here, draw a line there, and so forth) into something your printer can understand and then sends the information to the printer for printing.”

Now as I was instructed by the community I tried to add a printer but then, the devil popped out, the http authentication window asking for user/password credentials. Well, I figured out that it refers to my login credential so I tried but the page refreshed and a message in the screen saying FORBIDEN.

After reading a couple of forums, I tried refresing the root password, adding my user in the lpadmin group and on and on… and, of course, FORBIDEN became the worst bad word someone could ever said to me that day. I was frustrated. But then the light appeared, and a solution that really works come to my attention that illuminated my way and finally I was able to access the administration section of CUPS web interface. Halleluhiah!

But I will trace my steps just in case this does not work by itself (for this just hit Ctrl+Alt+T to open the terminal):

First download and install drivers from Linux Open Printing:

Find your printer by manufacturer and model. Make sure to download the PPD files too, which you will required when installing.

Adding my user into the lpadmin group using:

sudo usermod -a -G lpadmin username

Adding root user into the lpadmin group using:

sudo usermod -a -G lpadmin username

Edit the CUPS configuration file that can be found in /etc/cups/ with the command:

sudo gedit /etc/cups/cupsd.conf

Add the following lines after the line that says Listen /var/run/cups/cups.sock:
Listen 127.0.0.1:631 #to allow web interface
Listen 192.168.10.250:631 #to allow network access

Find the line <Location /admin/conf> and add in between:
Order allow,deny
Allow @LOCAL

Shoul looks:

AuthType Default
Require user @SYSTEM
Order allow,deny
Allow @LOCAL

Now, what really do the trick, add the following line after WebInterface Yes:

SystemGroup lpadmin

That’s it, try accessing or adding a printer with the web interface a leave a comment if works!

If your problem persists try:


gksudo system-config-printer

And add the printer with the Gnome Interface.

Happy Coding!

Reference:
CUPS web interface wants a password?
Authentication required to modify a printer- what’s the password?
CUPS 403 Forbidden error
Open Printing

Leave a Reply