8

Cups "add printer" page returns forbidden on Web Interface on http://localhost:631/admin

I tried adding my main user to "lp" and restarting, but no change. I also tried setting at the top of the cups.conf SystemGroup printadmin and doing sudo systemctl restart cups to no avail.

Here is the relevant cups.conf

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>

I'm just trying to add a printer using the web interface, but something about the permissions doesn't allow my user credentials to work. There is no group named SYSTEM or lpadmin.

  • It's not obvious to me from the question, but it sounds like you have a web interface for cups and it's not working? Two ideas jump to mind -- that the HTTP server user (that's running the interface) does not have permission; the other is that there's an HTTP permission issue (or misconfiguration) that's preventing the interface from running/doing something. Could you expand on your question to clarify what you're doing? – Jeff Schaller Oct 11 '15 at 23:46
12

Update: On Fedora 25 this is now default... So if you're having this problem on Fedora 25+, you likely messed up your config or you have a different problem. But this might still be useful users of old installs of CentOS/RHEL... you should not be using Fedora 24 at this point.

Find /etc/cups/cups-files.conf as root. Look for the line with SystemGroup sys root add wheel to it.

The following two liner should do it for you on Fedora 24

 sudo sed -i '/SystemGroup sys root$/ s/$/ wheel/' /etc/cups/cups-files.conf
 sudo systemctl restart cups
  • 1
    Fedora 24 is still a supported release until sometime in the summer of 2017. So, while I too recommend upgrading, it's okay that not everyone has yet. :) – mattdm Jan 14 '17 at 14:23
7

The solution is

sudo usermod -a -G sys YourUser

I wrote a more detailed article on how to debug such issues.

  • 6
    It's a bit of a sledgehammer to add yourself to the system group, which may grant your user/processes more power than you'd expect. See my answer for a good alternative grants you access to cups alone. – Ray Foss Jul 8 '16 at 14:48
  • 4
    Eek - don't do this if you're setting it up for anyone other than yourself.. in your own home.. Can't use this solution as I'm setting up printing for a whole business, I don't want to give my users god-powers on the device. – Dagrooms Jun 13 '17 at 19:03
  • On a Debian-based OS this answer is valid if you use the group lpadmin. – AnthonyB Jul 29 at 13:50
2

I had to combine the 2 other answers for ubuntu, and the solution is to add yourslef to the lpadmin group:

sudo usermod -a -G lpadmin YourUser

For every system, the solution should be:

  • open file /etc/cups/cups-files.conf
  • find the group name at the line containing SystemGroup
  • add yourself to that group (command above) and apply it (reboot for example)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.