Previous Section  < Day Day Up >  Next Section

Recipe 14.9. Restricting Users from Printers and Classes

14.9.1 Problem

You have some printers you would like to restrict to selected users. You don't want people printing pictures of their kids on the design group's fancy graphics printer, for example.

14.9.2 Solution

Use the lpadmin command:

# lpadmin -p hp6L  -u allow:carla,jenn,dancer

This changes /etc/cups/printers.conf:

# Printer configuration file for CUPS v1.1.20

# Written by cupsd on Fri Jan  7 00:36:36 2004

<DefaultPrinter hp6L>

Info

Location

DeviceURI parallel:/dev/lp0

State Idle

Accepting Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

AllowUser carla

AllowUser jenn

AllowUser dancer

</Printer>

You can also restrict classes:

# lpadmin -p art-dept  -u allow:carla,jenn,dancer

This modifies /etc/cups/classes.conf.

You can also deny users:

# lpadmin -p hp6L  -u deny:daryl,larry,otherlarry

14.9.3 Discussion

Don't try to edit classes.conf or printers.conf directly, because your changes will be lost. Use lpadmin.

14.9.4 See Also

  • The "Managing Printers" section in the CUPS Software Administrators Manual (http://localhost:631/documentation.html)

    Previous Section  < Day Day Up >  Next Section