Here are a few examples of options that are presently only available if you use the commandline.
When installing (or modifying) a printer through the command line, you can either deny or allow the usage of that printer to certain users:
lpadmin -p
HeidelbergDigimaster9110
-v
lpd:/10.160.16.99/mqueue
-u
allow:kurt,sylvi,hansjoerg
-E
-P
/home/kurt/PPDs/DVHV.ppd
will allow the usage of this (believe me: very nice and also very professional) printer to only the three mentioned users and at the same time deny it to all others. If another user wants to print on the DigiMaster via this CUPS server, they will receive an error message along the lines client-error-not-possible.
lpadmin -p
HeidelbergDigimaster9110
-v
lpd:/10.160.16.99/mqueue
-u
deny:tackat,boss,waba
-E
-P
/home/kurt/PPDs/DVHV.ppd
will deny the usage of this same printer to the three mentioned users and at the same time allow it to all others. If “denied” user wants to print on the DigiMaster via this CUPS server, they will receive an error message along the lines client-error-not-possible.
Only one of the two options may be used at one time; at present there is no support to have a similar option in a per-group based way. This will be implemented in the future.
Sometimes you want to impose quotas for certain printers. With quotas you can set upper limits for the number of pages or the amount of data to be printed over a certain period to a certain printer.
Quotas can be set with the -o
option when
installing a printer with the lpadmin command, or
afterwards for an already existing printer. Following are some
guidelines (which are missing at the time of writing in the, official
CUPS documentation):
With CUPS you may have pagecount- and filesize-based quotas for individual printers.
Quotas are calculated for each user individually (so a single set of limits applies to all users for the printer concerned).
Quotas include banner pages (if those are used).
This means: you can limit every user to 20 pages per day on an
expensive printer, but you cannot limit every user except Kurt
or root
.
There are job-k-limit
,
job-page-limit
, and job-quota-period
options to give when setting up a printer.
job-quota-period
sets a time interval for quota
computing (intervals are determined in seconds; so a day is
60x60x24=86.400, a week is 60x60x24x7=604,800, and a month is
60x60x24x30=2.592.000 seconds.)
For quotas to be enforced, the time-period plus at least one job-limit must be set to non-zero.
The default value of 0 for job-k-limit
specifies
that there is no limit.
The default value of 0 for job-page-limit
specifies that there is no limit.
The default value of 0 for job-quota-period
specifies that the limits apply to all jobs that have been printed by a
user that are still known to the system.
Working, as both, time-period plus one or both job-limits are defined
lpadmin -p
danka_infotec_4850
-o
job-quota-period=604800
-o
job-k-limit=1024
This sets a limit of a file size of 1 MB (in total) for each user
of existing printer danka_infotec_4850
during one week.
lpadmin p
danka_infotec_4105
-o
job-quota-period=604800
-o
job-page-limit=100
This sets a limit of 100 pages (in total) for each user of
existing printer danka_infotec_4105
during one week.
lpadmin -p
danka_infotec_P450
-o
job-quota-period=604800
-o
job-k-limit=1024
-o
job-page-limit=100
This sets a combined limit of 1 MB (in total) and 100 pages (in
total) for each user of existing printer danka_infotec_P450
during one
week. Whichever limit is reached first will take effect.
NOT working, as only one, time-period or job-limit is defined)
lpadmin
-p
danka_infotec_P320
-o
job-quota-period=604800
lpadmin
-p
danka_infotec_FullColor
-o
job-page-limit=100
lpadmin
-p
danka_infotec_HiSpeed
-o
job-k-limit=1024
There are different ways to define a “raw” printer. One comfortable one is to use the lpadmin command. Just don't define a PPD file to be used for that printer and it will be a raw one:
lpadmin -p
Raw_Danka_infotec
-E
-v
lpd://10.160.16.137/PORT1
Raw printer queues are those which don't touch the print file to transform it to a different file format. You need this for example when printing from Windows® clients via Samba through a CUPS server to a PCL printer: in this case the Windows® side printer driver would generate the finished print file format for the target printer and filtering it through CUPS filters would only harm the purpose. Under certain circumstances (if you want to make sure that the file goes to the printer “unfiltered” by CUPS) the “lpadmin without a PPD” comes in handy.
Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team