Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-15-2010, 10:29 AM   #1
Registered: Jul 2009
Location: Chicago Suburbs
Distribution: Crux, CentOS, RHEL, Ubuntu
Posts: 96

Rep: Reputation: 23
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.


Last edited by kschmitt; 03-15-2010 at 10:30 AM. Reason: grammar
Old 03-15-2010, 12:08 PM   #2
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
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).
0 members found this post helpful.
Old 03-15-2010, 03:20 PM   #3
Registered: Jul 2009
Location: Chicago Suburbs
Distribution: Crux, CentOS, RHEL, Ubuntu
Posts: 96

Original Poster
Rep: Reputation: 23
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cups and Samba to print one print job to 2 printers - tutorial added bourne Linux - General 7 09-18-2009 10:10 AM
Does samba limit the size of files? aztek Debian 2 06-14-2006 12:53 AM
File size limit in Samba? RodWC Debian 3 02-03-2006 05:21 PM
samba file size limit? babag Linux - Networking 2 10-12-2005 02:26 PM
samba/cups print job size carpman Linux - Networking 1 01-25-2002 05:40 AM

All times are GMT -5. The time now is 08:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration