-   Linux - Server (
-   -   Limit print job size from samba? (

kschmitt 03-15-2010 10:29 AM

Limit print job size from samba?
Does anyone know of a way of limiting a print-job size from samba?

I know how to limit a print job size form cups, and how to require x amount of free space before accepting a job. I've even dug up how to require x amount of free space for samba to accept a print job, but I can't see how to limit samba to only certain sized jobs.

Someone tried to print a >1G file to my print-server this morning, causing me to have a less relaxed Monday than I had hoped. Because it ran out of space before spooling, it was never limited by cups. Because I had to get rid of it ASAP so people could get work done, I have no idea who's it was, or where it came from. Scouring logs didn't give me any good leads either.


smoker 03-15-2010 12:08 PM


Setting Up Quotas

This is an example command of how root would set a print quota in CUPS, assuming an existing printer named “quotaprinter”:

root# lpadmin -p quotaprinter -o job-quota-period=604800 \
-o job-k-limit=1024 -o job-page-limit=100

This would limit every single user to print no more than 100 pages or 1024 KB of data (whichever comes first) within the last 604,800 seconds ( = 1 week).

kschmitt 03-15-2010 03:20 PM

That's the cups side.
That covers it from the CUPS side, not the samba side. From what I understand, samba will still spool the document. Then, once it's all on disc, CUPS will apply it's limits, and throw out the job if it's too big.

All times are GMT -5. The time now is 03:06 PM.