Question

About cups, from the book UNIX and Linux System Administration:

If someone else adds a printer and one or more CUPS servers running on the network know about it, your CUPS server will learn of its existence. You don’t have to explicitly add the printer to the local inventory or copy PPDs to your machine. It’s magic.

So, to make everyone at the same network (192.168.0.0/24) learn about my configured printers, I need this configuration:

<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.0.0
</Location>

BrowseAddress 192.168.0.255:631

And to implement printer accounting:

lpadmin -p printer -o job-quota-period=604800 -o job-page-limit=100

In this example, theoretically, any user at network 192.168.0.0/24 can print 100 pages per week. But my problem is that I can't find anywhere how CUPS keeps track of printer utilization by users. I can't understand how CUPS can implement printer accounting without any authentication mechanism.

Was it helpful?

Solution

Accounting information is kept in /var/log/cups/page_log. See https://www.cups.org/documentation.php/doc-1.5/ref-page_log.html .

As for authentication, I believe CUPS simply trusts that you wouldn't allow printing from a machine that would lie to it about the user ID. See https://www.cups.org/documentation.php/doc-1.5/accounting.html

Not very secure, but perhaps that's for the best. Not everything has to be locked down like Fort Knox.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top