Aug 082012
 

I’ve just installed CUPS to play around with on my Raspberry Pi, and it seems that the default configuration file is very restrictive. I am unable to even access the Web Interface from another machine as Remote Administration is not enabled.

First thing to do – allow other machines to access CUPS.
Changing Line 20 from
Listen localhost:631
to
Listen 0.0.0.0:631
fixed that first problem.

Now, I can access the CUPS Forbidden page, but nothing else.
On line 36, the code below should be present.

<Location />
Order allow,deny
</Location>

Looks like CUPS is not explicitly set to allow connections from the local LAN.
Changing it to this has allowed me access from another machine, however I cannot access the “Administration” page.
That still gets me a forbidden error.

<Location />
Order allow,deny
Allow 10.0.0.0/24
</Location>

Looking at the configuration file, again it has not explicitly specified that access from the LAN is allowed.
On line 41, the code below should be present.

<Location /admin>
Order allow,deny
</Location>

Changing it to this seems to solve it

<Location /admin>
Order allow,deny
Allow 10.0.0.0/24
</Location>

Now I can access the CUPS server from another machine on my network to configure CUPS as my Raspberry Pi is headless at the moment. Just make sure you restart the CUPS service by running /etc/init.d/cups restart after you’ve changed your configuration file !

Hope this helps people !

Share

  9 Responses to “How To : Set Up CUPS on Raspbian Wheezy”

  1. Yes, that helped get me going quickly. Its been a few years since setting up cups. Thanks for posting this info.

  2. After doing the modifications. When I try to restart CUPS is fails with a message that it cannot read cupsd.conf suggesting some syntactical error. When I revert these modifications I’m able to restart cups. Confused !

  3. You should say that it will works with any cups installation, that would help some other people 😉

  4. Great! Solved my nagging problem that had me going around in circles this morning! Thanks.

  5. 6/23/2015: Running pi 2, Raspbian of May 2015. Installed cups. Used usermod to add pi to the group. Have old HP 6122 attached via usb. Cups can see it very well. But I cannot get CUPS to add the printer. After picking ‘hp 6122’ from the first list and then continue, I get the second (long) list of drivers but NO ‘ADD PRINTER’ button anywhere below. Just the list.
    Done this over and over.
    I’ve found some other ‘improvements’ in the latest Raspbian that create big problems. I guess they have made it impossible to use Cups, or so it seems.

    • I wouldn’t think they would have made it impossible to use CUPS…I’ll double check with CUPS and my spare Pi when I get the chance to.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.