Allow the user to configure CUPS

Jurjen Bokma

january 2013

Abstract

On Ubuntu Precise, the user isn't allowed to add or remove printers on my machine. Here's how to fix that.


Problem is that the local desktop is no longer allowed to perform administrator actions on the CUPS configuration. This is in part due to my peculiar PAM settings, but AppArmor is in the way too. So I set the cups apparmor policy to complain (instead of enforce):

apprentice@pc:~$ sudo aa-complain /etc/apparmor.d/usr.sbin.cupsd
apprentice@pc:~$ sudo ln -s /etc/apparmor.d/usr.sbin.cupsd /etc/apparmor.d/disable/
apprentice@pc:~$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.cupsd

There happens to be a little bug in /etc/cups/cupsd.conf, which we remedy by

apprentice@pc:~$ sudo sed -i '/^[[:space:]]*SystemGroup/ s/^/#/' /etc/cups/cupsd.conf

After that, it's generally enough to make yourself a member of the group 'lpadmin'.