On certain Linux systems – say, openSUSE in my case – logging in as root is disallowed. However, CUPS and the accompanying web console (http://localhost:631
) require the root user to log in in order to configure or add printers. So how can we get around this problem?
Follow these steps to allow regular/non-system users to manage printers on your Linux system:
- Change into the CUPS directory:
cd /etc/cups
- Edit the "cupsd" configuration file:
sudo vim cupsd.conf
- Locate the line which says "
<Limit CUPS-Add-Modify-Printer...
". - On the following line, immediately after the text "
Require user @SYSTEM
" add the desired user whom you would like to allow to configure CUPS. [See my example below.] - Save and quit,
:wq
. - Do a
sudo killall cupsd
to shut down all CUPS services. - Next do
sudo systemctl restart cups.service
to re-enable and restart the service. - Open your browser and go to
http://localhost:631
. - Click on 'Adding Printers and Classes'; log in if necessary. Alternatively, enter:
http://localhost:631/admin
and then log in if necessary. - Click 'Add Printer'.
- If you followed these steps correctly, you should now be able to configure new printers as desired as if you were the SYSTEM/root user.
My example of /etc/cups/cupsd.conf
(edited):
# All administration operations require an administrator to authenticate... < Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices> AuthType Default Require user @SYSTEM adam Order deny,allow < /Limit>