xref: /aosp_15_r20/external/libcups/doc/help/policies.html (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard Worker<HTML>
2*5e7646d2SAndroid Build Coastguard Worker<!-- SECTION: Getting Started -->
3*5e7646d2SAndroid Build Coastguard Worker<HEAD>
4*5e7646d2SAndroid Build Coastguard Worker	<TITLE>Managing Operation Policies</TITLE>
5*5e7646d2SAndroid Build Coastguard Worker	<LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
6*5e7646d2SAndroid Build Coastguard Worker</HEAD>
7*5e7646d2SAndroid Build Coastguard Worker<BODY>
8*5e7646d2SAndroid Build Coastguard Worker
9*5e7646d2SAndroid Build Coastguard Worker<H1 CLASS="title">Managing Operation Policies</H1>
10*5e7646d2SAndroid Build Coastguard Worker
11*5e7646d2SAndroid Build Coastguard Worker<P>Operation policies are the rules used for each IPP operation in CUPS. These rules include things like "user must provide a password", "user must be in the system group", "allow only from the local system", and so forth. Until CUPS 1.2, these rules were largely hardcoded and could only be customized at a very basic level.</P>
12*5e7646d2SAndroid Build Coastguard Worker
13*5e7646d2SAndroid Build Coastguard Worker<P>CUPS 1.2 and later provides a fine-grained policy layer which allows you to completely redefine the rules for each operation and/or printer. Each policy is named and defines access control rules for each IPP operation. This document describes how to manage policies and their rules.</P>
14*5e7646d2SAndroid Build Coastguard Worker
15*5e7646d2SAndroid Build Coastguard Worker<H2 CLASS="title"><A NAME="BASICS">The Basics</A></H2>
16*5e7646d2SAndroid Build Coastguard Worker
17*5e7646d2SAndroid Build Coastguard Worker<P>Operation policies are used for all IPP requests sent to the scheduler and are evaluated <em>after</em> the <A HREF="man-cupsd.conf.html#Location"><TT>Location</TT></A> based access control rules. This means that operation policies can only add additional security restrictions to a request, never relax them. Use <TT>Location</TT> based access control rules for server-wide limits and operation policies for limits on individual printers, tasks, or services.</P>
18*5e7646d2SAndroid Build Coastguard Worker
19*5e7646d2SAndroid Build Coastguard Worker<P>Policies are stored in the <VAR>cupsd.conf</VAR> file in <A HREF="man-cupsd.conf.html#Policy"><TT>Policy</TT></A> sections. Each policy has an alphanumeric name that is used to select it. Inside the policy section are one or more <A
20*5e7646d2SAndroid Build Coastguard WorkerHREF="man-cupsd.conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list the operations that are affected by the rules inside it. <A HREF="#LISTING01">Listing 1</A> shows the default operation policy, appropriately called "default", that is shipped with CUPS.</P>
21*5e7646d2SAndroid Build Coastguard Worker
22*5e7646d2SAndroid Build Coastguard Worker<P>The easiest way to add a policy to the <VAR>cupsd.conf</VAR> file is to use the web interface. Click on the <VAR>Administration</VAR> tab and then the <VAR>Edit Configuration File</VAR> button to edit the current <VAR>cupsd.conf</VAR> file. Click on the <VAR>Save Changes</VAR> button to save the changes and restart the scheduler. If you edit the <VAR>cupsd.conf</VAR> file from the console, make sure to <A HREF="man-cupsd.conf.html">restart the cupsd process</A> before trying to use the new policy.</P>
23*5e7646d2SAndroid Build Coastguard Worker
24*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="example">
25*5e7646d2SAndroid Build Coastguard Worker<EM>Listing 1: <A NAME="LISTING01">Default Operation Policy</A></EM>
26*5e7646d2SAndroid Build Coastguard Worker
27*5e7646d2SAndroid Build Coastguard Worker 1    &lt;Policy default>
28*5e7646d2SAndroid Build Coastguard Worker 2      # Job-related operations must be done by the owner or an
29*5e7646d2SAndroid Build Coastguard Worker      administrator...
30*5e7646d2SAndroid Build Coastguard Worker 3      &lt;Limit Send-Document Send-URI Hold-Job Release-Job
31*5e7646d2SAndroid Build Coastguard Worker      Restart-Job Purge-Jobs Set-Job-Attributes
32*5e7646d2SAndroid Build Coastguard Worker      Create-Job-Subscription Renew-Subscription
33*5e7646d2SAndroid Build Coastguard Worker      Cancel-Subscription Get-Notifications Reprocess-Job
34*5e7646d2SAndroid Build Coastguard Worker      Cancel-Current-Job Suspend-Current-Job Resume-Job
35*5e7646d2SAndroid Build Coastguard Worker      CUPS-Move-Job CUPS-Get-Document>
36*5e7646d2SAndroid Build Coastguard Worker 4        Require user @OWNER @SYSTEM
37*5e7646d2SAndroid Build Coastguard Worker 5        Order deny,allow
38*5e7646d2SAndroid Build Coastguard Worker 6      &lt;/Limit>
39*5e7646d2SAndroid Build Coastguard Worker 7
40*5e7646d2SAndroid Build Coastguard Worker 8      # All administration operations require an administrator
41*5e7646d2SAndroid Build Coastguard Worker      to authenticate...
42*5e7646d2SAndroid Build Coastguard Worker 9      &lt;Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class
43*5e7646d2SAndroid Build Coastguard Worker      CUPS-Delete-Class CUPS-Set-Default>
44*5e7646d2SAndroid Build Coastguard Worker10        AuthType Default
45*5e7646d2SAndroid Build Coastguard Worker11        Require user @SYSTEM
46*5e7646d2SAndroid Build Coastguard Worker12        Order deny,allow
47*5e7646d2SAndroid Build Coastguard Worker13      &lt;/Limit>
48*5e7646d2SAndroid Build Coastguard Worker14
49*5e7646d2SAndroid Build Coastguard Worker15      # All printer operations require a printer operator
50*5e7646d2SAndroid Build Coastguard Worker      to authenticate...
51*5e7646d2SAndroid Build Coastguard Worker16      &lt;Limit Pause-Printer Resume-Printer
52*5e7646d2SAndroid Build Coastguard Worker      Set-Printer-Attributes Enable-Printer Disable-Printer
53*5e7646d2SAndroid Build Coastguard Worker      Pause-Printer-After-Current-Job Hold-New-Jobs
54*5e7646d2SAndroid Build Coastguard Worker      Release-Held-New-Jobs Deactivate-Printer Activate-Printer
55*5e7646d2SAndroid Build Coastguard Worker      Restart-Printer Shutdown-Printer Startup-Printer
56*5e7646d2SAndroid Build Coastguard Worker      Promote-Job Schedule-Job-After CUPS-Accept-Jobs
57*5e7646d2SAndroid Build Coastguard Worker      CUPS-Reject-Jobs>
58*5e7646d2SAndroid Build Coastguard Worker17        AuthType Default
59*5e7646d2SAndroid Build Coastguard Worker18        Require user <em>varies by OS</em>
60*5e7646d2SAndroid Build Coastguard Worker19        Order deny,allow
61*5e7646d2SAndroid Build Coastguard Worker20      &lt;/Limit>
62*5e7646d2SAndroid Build Coastguard Worker21
63*5e7646d2SAndroid Build Coastguard Worker22      # Only the owner or an administrator can cancel or
64*5e7646d2SAndroid Build Coastguard Worker      authenticate a job...
65*5e7646d2SAndroid Build Coastguard Worker23      &lt;Limit Cancel-Job CUPS-Authenticate-Job>
66*5e7646d2SAndroid Build Coastguard Worker24        Require user @OWNER @SYSTEM
67*5e7646d2SAndroid Build Coastguard Worker25        Order deny,allow
68*5e7646d2SAndroid Build Coastguard Worker26      &lt;/Limit>
69*5e7646d2SAndroid Build Coastguard Worker27
70*5e7646d2SAndroid Build Coastguard Worker28      &lt;Limit All>
71*5e7646d2SAndroid Build Coastguard Worker29        Order deny,allow
72*5e7646d2SAndroid Build Coastguard Worker30      &lt;/Limit>
73*5e7646d2SAndroid Build Coastguard Worker31    &lt;/Policy>
74*5e7646d2SAndroid Build Coastguard Worker</PRE>
75*5e7646d2SAndroid Build Coastguard Worker
76*5e7646d2SAndroid Build Coastguard Worker<H3>The Default CUPS Operation Policy</H3>
77*5e7646d2SAndroid Build Coastguard Worker
78*5e7646d2SAndroid Build Coastguard Worker<P>The policy definition starts with an opening <TT>Policy</TT> directive:</P>
79*5e7646d2SAndroid Build Coastguard Worker
80*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="example">
81*5e7646d2SAndroid Build Coastguard Worker 1    &lt;Policy default>
82*5e7646d2SAndroid Build Coastguard Worker</PRE>
83*5e7646d2SAndroid Build Coastguard Worker
84*5e7646d2SAndroid Build Coastguard Worker<P>The first <TT>Limit</TT> subsection defines the rules for IPP job operations:</P>
85*5e7646d2SAndroid Build Coastguard Worker
86*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="example">
87*5e7646d2SAndroid Build Coastguard Worker 3      &lt;Limit Send-Document Send-URI Hold-Job Release-Job
88*5e7646d2SAndroid Build Coastguard Worker      Restart-Job Purge-Jobs Set-Job-Attributes
89*5e7646d2SAndroid Build Coastguard Worker      Create-Job-Subscription Renew-Subscription
90*5e7646d2SAndroid Build Coastguard Worker      Cancel-Subscription Get-Notifications Reprocess-Job
91*5e7646d2SAndroid Build Coastguard Worker      Cancel-Current-Job Suspend-Current-Job Resume-Job
92*5e7646d2SAndroid Build Coastguard Worker      CUPS-Move-Job CUPS-Get-Document>
93*5e7646d2SAndroid Build Coastguard Worker 4        Require user @OWNER @SYSTEM
94*5e7646d2SAndroid Build Coastguard Worker 5        Order deny,allow
95*5e7646d2SAndroid Build Coastguard Worker 6      &lt;/Limit>
96*5e7646d2SAndroid Build Coastguard Worker</PRE>
97*5e7646d2SAndroid Build Coastguard Worker
98*5e7646d2SAndroid Build Coastguard Worker<P>The operation names are listed on a single line with spaces separating them. Each name corresponds to the IPP operation described in any of the IETF or PWG standards documents for the Internet Printing Protocol. <A HREF="#TABLE01">Table 1</A> lists all of the operations that have been defined along with their usage in CUPS.</P>
99*5e7646d2SAndroid Build Coastguard Worker
100*5e7646d2SAndroid Build Coastguard Worker<P>The access control rules are listed after the <TT>Limit</TT> line and are the same as those used for <A HREF="man-cupsd.conf.html#Location"><TT>Location</TT></A> sections. In this case, we require the owner of the job ("@OWNER") or a member of the <A HREF="man-cups-files.conf.html#SystemGroup"><TT>SystemGroup</TT></A> ("@SYSTEM") to do the operation. Because we do not include an <A HREF="man-cupsd.conf.html#AuthType"><TT>AuthType</TT></A> directive here, the user information can come from the IPP request itself or the authenticated username from the HTTP request. The administrative operations starting on line 9, however, <em>do</em> use the <TT>AuthType</TT> directive, and so administrative operations need to be authenticated:</P>
101*5e7646d2SAndroid Build Coastguard Worker
102*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="example">
103*5e7646d2SAndroid Build Coastguard Worker 9      &lt;Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class
104*5e7646d2SAndroid Build Coastguard Worker      CUPS-Delete-Class CUPS-Set-Default>
105*5e7646d2SAndroid Build Coastguard Worker10        AuthType Default
106*5e7646d2SAndroid Build Coastguard Worker11        Require user @SYSTEM
107*5e7646d2SAndroid Build Coastguard Worker12        Order deny,allow
108*5e7646d2SAndroid Build Coastguard Worker13      &lt;/Limit>
109*5e7646d2SAndroid Build Coastguard Worker14
110*5e7646d2SAndroid Build Coastguard Worker15      # All printer operations require a printer operator
111*5e7646d2SAndroid Build Coastguard Worker      to authenticate...
112*5e7646d2SAndroid Build Coastguard Worker16      &lt;Limit Pause-Printer Resume-Printer
113*5e7646d2SAndroid Build Coastguard Worker      Set-Printer-Attributes Enable-Printer Disable-Printer
114*5e7646d2SAndroid Build Coastguard Worker      Pause-Printer-After-Current-Job Hold-New-Jobs
115*5e7646d2SAndroid Build Coastguard Worker      Release-Held-New-Jobs Deactivate-Printer Activate-Printer
116*5e7646d2SAndroid Build Coastguard Worker      Restart-Printer Shutdown-Printer Startup-Printer
117*5e7646d2SAndroid Build Coastguard Worker      Promote-Job Schedule-Job-After CUPS-Accept-Jobs
118*5e7646d2SAndroid Build Coastguard Worker      CUPS-Reject-Jobs>
119*5e7646d2SAndroid Build Coastguard Worker17        AuthType Default
120*5e7646d2SAndroid Build Coastguard Worker18        Require user <em>varies by OS</em>
121*5e7646d2SAndroid Build Coastguard Worker19        Order deny,allow
122*5e7646d2SAndroid Build Coastguard Worker20      &lt;/Limit>
123*5e7646d2SAndroid Build Coastguard Worker</PRE>
124*5e7646d2SAndroid Build Coastguard Worker
125*5e7646d2SAndroid Build Coastguard Worker<P>The "Order deny,allow" line at the end of both <TT>Limit</TT> subsections allows the request to come from any system allowed by the <TT>Location</TT> sections elsewhere in the <VAR>cupsd.conf</VAR> file.</P>
126*5e7646d2SAndroid Build Coastguard Worker
127*5e7646d2SAndroid Build Coastguard Worker<P>The <TT>Cancel-Job</TT> and <TT>CUPS-Authenticate-Job</TT> operations are listed separately to allow the web interface to more easily edit their policy without disturbing the rest. Like the rest of the job operations, we want the job's owner ("@OWNER") or an administrator ("@SYSTEM") to do it:</P>
128*5e7646d2SAndroid Build Coastguard Worker
129*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="example">
130*5e7646d2SAndroid Build Coastguard Worker16      &lt;Limit Cancel-Job CUPS-Authenticate-Job>
131*5e7646d2SAndroid Build Coastguard Worker17        Require user @OWNER @SYSTEM
132*5e7646d2SAndroid Build Coastguard Worker18        Order deny,allow
133*5e7646d2SAndroid Build Coastguard Worker19      &lt;/Limit>
134*5e7646d2SAndroid Build Coastguard Worker</PRE>
135*5e7646d2SAndroid Build Coastguard Worker
136*5e7646d2SAndroid Build Coastguard Worker<P>The last <TT>Limit</TT> subsection in any policy uses the special operation name <TT>All</TT>. CUPS will use the rules in this subsection for any operation you don't list specifically in the policy. In this case, all other operations are allowed without a username or authentication:</P>
137*5e7646d2SAndroid Build Coastguard Worker
138*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="example">
139*5e7646d2SAndroid Build Coastguard Worker21      &lt;Limit All>
140*5e7646d2SAndroid Build Coastguard Worker22        Order deny,allow
141*5e7646d2SAndroid Build Coastguard Worker23      &lt;/Limit>
142*5e7646d2SAndroid Build Coastguard Worker24    &lt;/Policy>
143*5e7646d2SAndroid Build Coastguard Worker</PRE>
144*5e7646d2SAndroid Build Coastguard Worker
145*5e7646d2SAndroid Build Coastguard Worker
146*5e7646d2SAndroid Build Coastguard Worker<DIV CLASS="table"><TABLE WIDTH="80%" SUMMARY="IPP Operation Names">
147*5e7646d2SAndroid Build Coastguard Worker<CAPTION>Table 1: <A NAME="TABLE01">IPP Operation Names</A></CAPTION>
148*5e7646d2SAndroid Build Coastguard Worker<THEAD>
149*5e7646d2SAndroid Build Coastguard Worker<TR>
150*5e7646d2SAndroid Build Coastguard Worker	<TH>Name</TH>
151*5e7646d2SAndroid Build Coastguard Worker	<TH>Used by CUPS?</TH>
152*5e7646d2SAndroid Build Coastguard Worker	<TH>Description</TH>
153*5e7646d2SAndroid Build Coastguard Worker</TR>
154*5e7646d2SAndroid Build Coastguard Worker</THEAD>
155*5e7646d2SAndroid Build Coastguard Worker<TBODY>
156*5e7646d2SAndroid Build Coastguard Worker<TR>
157*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Activate-Printer</TT></TD>
158*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
159*5e7646d2SAndroid Build Coastguard Worker	<TD>Activates a printer or class.</TD>
160*5e7646d2SAndroid Build Coastguard Worker</TR>
161*5e7646d2SAndroid Build Coastguard Worker<TR>
162*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Cancel-Current-Job</TT></TD>
163*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
164*5e7646d2SAndroid Build Coastguard Worker	<TD>Cancels the current job on a printer or class.</TD>
165*5e7646d2SAndroid Build Coastguard Worker</TR>
166*5e7646d2SAndroid Build Coastguard Worker<TR>
167*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Cancel-Job</TT></TD>
168*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
169*5e7646d2SAndroid Build Coastguard Worker	<TD>Cancels a print job.</TD>
170*5e7646d2SAndroid Build Coastguard Worker</TR>
171*5e7646d2SAndroid Build Coastguard Worker<TR>
172*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Cancel-Jobs</TT></TD>
173*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
174*5e7646d2SAndroid Build Coastguard Worker	<TD>Cancels all print jobs.</TD>
175*5e7646d2SAndroid Build Coastguard Worker</TR>
176*5e7646d2SAndroid Build Coastguard Worker<TR>
177*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Cancel-My-Jobs</TT></TD>
178*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
179*5e7646d2SAndroid Build Coastguard Worker	<TD>Cancels a user's print job.</TD>
180*5e7646d2SAndroid Build Coastguard Worker</TR>
181*5e7646d2SAndroid Build Coastguard Worker<TR>
182*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Cancel-Subscription</TT></TD>
183*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
184*5e7646d2SAndroid Build Coastguard Worker	<TD>Cancels an event subscription.</TD>
185*5e7646d2SAndroid Build Coastguard Worker</TR>
186*5e7646d2SAndroid Build Coastguard Worker<TR>
187*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Close-Job</TT></TD>
188*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
189*5e7646d2SAndroid Build Coastguard Worker	<TD>Closes a user's print job so that it can be printed.</TD>
190*5e7646d2SAndroid Build Coastguard Worker</TR>
191*5e7646d2SAndroid Build Coastguard Worker<TR>
192*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Create-Job</TT></TD>
193*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
194*5e7646d2SAndroid Build Coastguard Worker	<TD>Creates a print job with no files or URIs.</TD>
195*5e7646d2SAndroid Build Coastguard Worker</TR>
196*5e7646d2SAndroid Build Coastguard Worker<TR>
197*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Create-Job-Subscriptions</TT></TD>
198*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
199*5e7646d2SAndroid Build Coastguard Worker	<TD>Creates one or more event subscriptions for a job.</TD>
200*5e7646d2SAndroid Build Coastguard Worker</TR>
201*5e7646d2SAndroid Build Coastguard Worker<TR>
202*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Create-Printer-Subscriptions</TT></TD>
203*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
204*5e7646d2SAndroid Build Coastguard Worker	<TD>Creates one or more event subscriptions for a printer or the server.</TD>
205*5e7646d2SAndroid Build Coastguard Worker</TR>
206*5e7646d2SAndroid Build Coastguard Worker<TR>
207*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Deactivate-Printer</TT></TD>
208*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
209*5e7646d2SAndroid Build Coastguard Worker	<TD>Deactivates a printer or class.</TD>
210*5e7646d2SAndroid Build Coastguard Worker</TR>
211*5e7646d2SAndroid Build Coastguard Worker<TR>
212*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Disable-Printer</TT></TD>
213*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
214*5e7646d2SAndroid Build Coastguard Worker	<TD>Stops a printer or class.</TD>
215*5e7646d2SAndroid Build Coastguard Worker</TR>
216*5e7646d2SAndroid Build Coastguard Worker<TR>
217*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Enable-Printer</TT></TD>
218*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
219*5e7646d2SAndroid Build Coastguard Worker	<TD>Starts a printer or class.</TD>
220*5e7646d2SAndroid Build Coastguard Worker</TR>
221*5e7646d2SAndroid Build Coastguard Worker<TR>
222*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Get-Job-Attributes</TT></TD>
223*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
224*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets information and options associated with a job.</TD>
225*5e7646d2SAndroid Build Coastguard Worker</TR>
226*5e7646d2SAndroid Build Coastguard Worker<TR>
227*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Get-Jobs</TT></TD>
228*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
229*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets a list of jobs.</TD>
230*5e7646d2SAndroid Build Coastguard Worker</TR>
231*5e7646d2SAndroid Build Coastguard Worker<TR>
232*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Get-Notifications</TT></TD>
233*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
234*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets (pending) events for an event subscription.</TD>
235*5e7646d2SAndroid Build Coastguard Worker</TR>
236*5e7646d2SAndroid Build Coastguard Worker<TR>
237*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Get-Printer-Attributes</TT></TD>
238*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
239*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets information and options associated with a printer or class.</TD>
240*5e7646d2SAndroid Build Coastguard Worker</TR>
241*5e7646d2SAndroid Build Coastguard Worker<TR>
242*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Get-Printer-Supported-Values</TT></TD>
243*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
244*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets -supported attributes for a printer based on job
245*5e7646d2SAndroid Build Coastguard Worker	options.</TD>
246*5e7646d2SAndroid Build Coastguard Worker</TR>
247*5e7646d2SAndroid Build Coastguard Worker<TR>
248*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Get-Subscription-Attributes</TT></TD>
249*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
250*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets information for an event subscription.</TD>
251*5e7646d2SAndroid Build Coastguard Worker</TR>
252*5e7646d2SAndroid Build Coastguard Worker<TR>
253*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Get-Subscriptions</TT></TD>
254*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
255*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets a list of event subscriptions.</TD>
256*5e7646d2SAndroid Build Coastguard Worker</TR>
257*5e7646d2SAndroid Build Coastguard Worker<TR>
258*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Hold-Job</TT></TD>
259*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
260*5e7646d2SAndroid Build Coastguard Worker	<TD>Holds a print job for printing.</TD>
261*5e7646d2SAndroid Build Coastguard Worker</TR>
262*5e7646d2SAndroid Build Coastguard Worker<TR>
263*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Hold-New-Jobs</TT></TD>
264*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
265*5e7646d2SAndroid Build Coastguard Worker	<TD>Holds new jobs submitted to a printer or class.</TD>
266*5e7646d2SAndroid Build Coastguard Worker</TR>
267*5e7646d2SAndroid Build Coastguard Worker<TR>
268*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Pause-Printer</TT></TD>
269*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
270*5e7646d2SAndroid Build Coastguard Worker	<TD>Stops a printer or class.</TD>
271*5e7646d2SAndroid Build Coastguard Worker</TR>
272*5e7646d2SAndroid Build Coastguard Worker<TR>
273*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Pause-Printer-After-Current-Job</TT></TD>
274*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
275*5e7646d2SAndroid Build Coastguard Worker	<TD>Stops a printer or class after the current job is finished.</TD>
276*5e7646d2SAndroid Build Coastguard Worker</TR>
277*5e7646d2SAndroid Build Coastguard Worker<TR>
278*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Print-Job</TT></TD>
279*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
280*5e7646d2SAndroid Build Coastguard Worker	<TD>Creates a print job with a single file.</TD>
281*5e7646d2SAndroid Build Coastguard Worker</TR>
282*5e7646d2SAndroid Build Coastguard Worker<TR>
283*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Print-URI</TT></TD>
284*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
285*5e7646d2SAndroid Build Coastguard Worker	<TD>Create a print job with a single URI.</TD>
286*5e7646d2SAndroid Build Coastguard Worker</TR>
287*5e7646d2SAndroid Build Coastguard Worker<TR>
288*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Promote-Job</TT></TD>
289*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
290*5e7646d2SAndroid Build Coastguard Worker	<TD>Prints a job before others.</TD>
291*5e7646d2SAndroid Build Coastguard Worker</TR>
292*5e7646d2SAndroid Build Coastguard Worker<TR>
293*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Purge-Jobs</TT></TD>
294*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
295*5e7646d2SAndroid Build Coastguard Worker	<TD>Cancels all jobs on the server or a printer or class
296*5e7646d2SAndroid Build Coastguard Worker	and removes the job history information.</TD>
297*5e7646d2SAndroid Build Coastguard Worker</TR>
298*5e7646d2SAndroid Build Coastguard Worker<TR>
299*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Release-Held-New-Jobs</TT></TD>
300*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
301*5e7646d2SAndroid Build Coastguard Worker	<TD>Releases jobs that were held because of the
302*5e7646d2SAndroid Build Coastguard Worker	Hold-New-Jobs operation.</TD>
303*5e7646d2SAndroid Build Coastguard Worker</TR>
304*5e7646d2SAndroid Build Coastguard Worker<TR>
305*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Release-Job</TT></TD>
306*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
307*5e7646d2SAndroid Build Coastguard Worker	<TD>Releases a print job for printing.</TD>
308*5e7646d2SAndroid Build Coastguard Worker</TR>
309*5e7646d2SAndroid Build Coastguard Worker<TR>
310*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Renew-Subscription</TT></TD>
311*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
312*5e7646d2SAndroid Build Coastguard Worker	<TD>Renews an event subscription that is about to expire.</TD>
313*5e7646d2SAndroid Build Coastguard Worker</TR>
314*5e7646d2SAndroid Build Coastguard Worker<TR>
315*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Reprocess-Job</TT></TD>
316*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
317*5e7646d2SAndroid Build Coastguard Worker	<TD>Reprints a job on a different printer or class; CUPS has the
318*5e7646d2SAndroid Build Coastguard Worker	CUPS-Move-Job operation instead.</TD>
319*5e7646d2SAndroid Build Coastguard Worker</TR>
320*5e7646d2SAndroid Build Coastguard Worker<TR>
321*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Restart-Job</TT></TD>
322*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
323*5e7646d2SAndroid Build Coastguard Worker	<TD>Reprints a print job.</TD>
324*5e7646d2SAndroid Build Coastguard Worker</TR>
325*5e7646d2SAndroid Build Coastguard Worker<TR>
326*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Restart-Printer</TT></TD>
327*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
328*5e7646d2SAndroid Build Coastguard Worker	<TD>Restarts a printer or class, resuming print jobs as needed.</TD>
329*5e7646d2SAndroid Build Coastguard Worker</TR>
330*5e7646d2SAndroid Build Coastguard Worker<TR>
331*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Resubmit-Job</TT></TD>
332*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
333*5e7646d2SAndroid Build Coastguard Worker	<TD>Reprints a job with new options.</TD>
334*5e7646d2SAndroid Build Coastguard Worker</TR>
335*5e7646d2SAndroid Build Coastguard Worker<TR>
336*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Resume-Job</TT></TD>
337*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
338*5e7646d2SAndroid Build Coastguard Worker	<TD>Resumes printing of a stopped job.</TD>
339*5e7646d2SAndroid Build Coastguard Worker</TR>
340*5e7646d2SAndroid Build Coastguard Worker<TR>
341*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Resume-Printer</TT></TD>
342*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
343*5e7646d2SAndroid Build Coastguard Worker	<TD>Starts a printer or class.</TD>
344*5e7646d2SAndroid Build Coastguard Worker</TR>
345*5e7646d2SAndroid Build Coastguard Worker<TR>
346*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Schedule-Job-After</TT></TD>
347*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
348*5e7646d2SAndroid Build Coastguard Worker	<TD>Prints a job after others.</TD>
349*5e7646d2SAndroid Build Coastguard Worker</TR>
350*5e7646d2SAndroid Build Coastguard Worker<TR>
351*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Send-Document</TT></TD>
352*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
353*5e7646d2SAndroid Build Coastguard Worker	<TD>Adds a file to a print job.</TD>
354*5e7646d2SAndroid Build Coastguard Worker</TR>
355*5e7646d2SAndroid Build Coastguard Worker<TR>
356*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Send-URI</TT></TD>
357*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
358*5e7646d2SAndroid Build Coastguard Worker	<TD>Adds a URI to a print job.</TD>
359*5e7646d2SAndroid Build Coastguard Worker</TR>
360*5e7646d2SAndroid Build Coastguard Worker<TR>
361*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Set-Printer-Attributes</TT></TD>
362*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
363*5e7646d2SAndroid Build Coastguard Worker	<TD>Sets printer or class information; CUPS uses
364*5e7646d2SAndroid Build Coastguard Worker	CUPS-Add-Modify-Printer and CUPS-Add-Modify-Class
365*5e7646d2SAndroid Build Coastguard Worker	for most attributes instead.</TD>
366*5e7646d2SAndroid Build Coastguard Worker</TR>
367*5e7646d2SAndroid Build Coastguard Worker<TR>
368*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Set-Job-Attributes</TT></TD>
369*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
370*5e7646d2SAndroid Build Coastguard Worker	<TD>Changes job options.</TD>
371*5e7646d2SAndroid Build Coastguard Worker</TR>
372*5e7646d2SAndroid Build Coastguard Worker<TR>
373*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Shutdown-Printer</TT></TD>
374*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
375*5e7646d2SAndroid Build Coastguard Worker	<TD>Powers a printer or class off.</TD>
376*5e7646d2SAndroid Build Coastguard Worker</TR>
377*5e7646d2SAndroid Build Coastguard Worker<TR>
378*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Startup-Printer</TT></TD>
379*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
380*5e7646d2SAndroid Build Coastguard Worker	<TD>Powers a printer or class on.</TD>
381*5e7646d2SAndroid Build Coastguard Worker</TR>
382*5e7646d2SAndroid Build Coastguard Worker<TR>
383*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Suspend-Current-Job</TT></TD>
384*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
385*5e7646d2SAndroid Build Coastguard Worker	<TD>Stops the current job on a printer or class.</TD>
386*5e7646d2SAndroid Build Coastguard Worker</TR>
387*5e7646d2SAndroid Build Coastguard Worker<TR>
388*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Validate-Document</TT></TD>
389*5e7646d2SAndroid Build Coastguard Worker	<TD>No</TD>
390*5e7646d2SAndroid Build Coastguard Worker	<TD>Validates a document request before sending.</TD>
391*5e7646d2SAndroid Build Coastguard Worker</TR>
392*5e7646d2SAndroid Build Coastguard Worker<TR>
393*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>Validate-Job</TT></TD>
394*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
395*5e7646d2SAndroid Build Coastguard Worker	<TD>Validates a print request before printing.</TD>
396*5e7646d2SAndroid Build Coastguard Worker</TR>
397*5e7646d2SAndroid Build Coastguard Worker<TR>
398*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Accept-Jobs</TT></TD>
399*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
400*5e7646d2SAndroid Build Coastguard Worker	<TD>Sets a printer's or class' printer-is-accepting-jobs
401*5e7646d2SAndroid Build Coastguard Worker	attribute to true.</TD>
402*5e7646d2SAndroid Build Coastguard Worker</TR>
403*5e7646d2SAndroid Build Coastguard Worker<TR>
404*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Add-Modify-Class</TT></TD>
405*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
406*5e7646d2SAndroid Build Coastguard Worker	<TD>Adds or modifies a class.</TD>
407*5e7646d2SAndroid Build Coastguard Worker</TR>
408*5e7646d2SAndroid Build Coastguard Worker<TR>
409*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Add-Modify-Printer</TT></TD>
410*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
411*5e7646d2SAndroid Build Coastguard Worker	<TD>Adds or modifies a printer.</TD>
412*5e7646d2SAndroid Build Coastguard Worker</TR>
413*5e7646d2SAndroid Build Coastguard Worker<TR>
414*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Authenticate-Job</TT></TD>
415*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
416*5e7646d2SAndroid Build Coastguard Worker	<TD>Authenticates a job for printing.</TD>
417*5e7646d2SAndroid Build Coastguard Worker</TR>
418*5e7646d2SAndroid Build Coastguard Worker<TR>
419*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Delete-Class</TT> *</TD>
420*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
421*5e7646d2SAndroid Build Coastguard Worker	<TD>Removes a class.</TD>
422*5e7646d2SAndroid Build Coastguard Worker</TR>
423*5e7646d2SAndroid Build Coastguard Worker<TR>
424*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Delete-Printer</TT> *</TD>
425*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
426*5e7646d2SAndroid Build Coastguard Worker	<TD>Removes a printer.</TD>
427*5e7646d2SAndroid Build Coastguard Worker</TR>
428*5e7646d2SAndroid Build Coastguard Worker<TR>
429*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Get-Classes</TT> *</TD>
430*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
431*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets a list of classes.</TD>
432*5e7646d2SAndroid Build Coastguard Worker</TR>
433*5e7646d2SAndroid Build Coastguard Worker<TR>
434*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Get-Default</TT> *</TD>
435*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
436*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets the server/network default printer or class.</TD>
437*5e7646d2SAndroid Build Coastguard Worker</TR>
438*5e7646d2SAndroid Build Coastguard Worker<TR>
439*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Get-Devices</TT> *</TD>
440*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
441*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets a list of printer devices.</TD>
442*5e7646d2SAndroid Build Coastguard Worker</TR>
443*5e7646d2SAndroid Build Coastguard Worker<TR>
444*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Get-Document</TT></TD>
445*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
446*5e7646d2SAndroid Build Coastguard Worker	<TD>Retrieves a document file from a job.</TD>
447*5e7646d2SAndroid Build Coastguard Worker</TR>
448*5e7646d2SAndroid Build Coastguard Worker<TR>
449*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Get-PPDs</TT> *</TD>
450*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
451*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets a list of printer drivers or manufacturers.</TD>
452*5e7646d2SAndroid Build Coastguard Worker</TR>
453*5e7646d2SAndroid Build Coastguard Worker<TR>
454*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Get-Printers</TT> *</TD>
455*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
456*5e7646d2SAndroid Build Coastguard Worker	<TD>Gets a list of printers and/or classes.</TD>
457*5e7646d2SAndroid Build Coastguard Worker</TR>
458*5e7646d2SAndroid Build Coastguard Worker<TR>
459*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Move-Job</TT></TD>
460*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
461*5e7646d2SAndroid Build Coastguard Worker	<TD>Moves a job to a different printer or class.</TD>
462*5e7646d2SAndroid Build Coastguard Worker</TR>
463*5e7646d2SAndroid Build Coastguard Worker<TR>
464*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Reject-Jobs</TT></TD>
465*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
466*5e7646d2SAndroid Build Coastguard Worker	<TD>Sets a printer's or class' printer-is-accepting-jobs
467*5e7646d2SAndroid Build Coastguard Worker	attribute to false.</TD>
468*5e7646d2SAndroid Build Coastguard Worker</TR>
469*5e7646d2SAndroid Build Coastguard Worker<TR>
470*5e7646d2SAndroid Build Coastguard Worker	<TD NOWRAP><TT>CUPS-Set-Default</TT> *</TD>
471*5e7646d2SAndroid Build Coastguard Worker	<TD>Yes</TD>
472*5e7646d2SAndroid Build Coastguard Worker	<TD>Sets the server/network default printer or class.</TD>
473*5e7646d2SAndroid Build Coastguard Worker</TR>
474*5e7646d2SAndroid Build Coastguard Worker</TBODY>
475*5e7646d2SAndroid Build Coastguard Worker</TABLE></DIV>
476*5e7646d2SAndroid Build Coastguard Worker
477*5e7646d2SAndroid Build Coastguard Worker<P>* = These operations only apply to the default policy.</P>
478*5e7646d2SAndroid Build Coastguard Worker
479*5e7646d2SAndroid Build Coastguard Worker<H2 CLASS="title"><A NAME="CREATING">Creating Your Own Policies</A></H2>
480*5e7646d2SAndroid Build Coastguard Worker
481*5e7646d2SAndroid Build Coastguard Worker<P>The easiest way to create a new policy is to start with the default policy and then make changes to the copy. The first change you'll make is to give the policy a new name. Policy names can use the same characters as a printer name, specifically all printable characters except space, slash (/), and pound (#):</P>
482*5e7646d2SAndroid Build Coastguard Worker
483*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="example">
484*5e7646d2SAndroid Build Coastguard Worker&lt;Policy mypolicy>
485*5e7646d2SAndroid Build Coastguard Worker</PRE>
486*5e7646d2SAndroid Build Coastguard Worker
487*5e7646d2SAndroid Build Coastguard Worker<P>Then you need to decide exactly what limits you want for the policy. For example, if you want to allow any user to cancel any other users' jobs, you can change the <TT>Cancel-Job</TT> limits to:</P>
488*5e7646d2SAndroid Build Coastguard Worker
489*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="example">
490*5e7646d2SAndroid Build Coastguard Worker&lt;Limit Cancel-Job>
491*5e7646d2SAndroid Build Coastguard Worker  Order deny,allow
492*5e7646d2SAndroid Build Coastguard Worker&lt;/Limit>
493*5e7646d2SAndroid Build Coastguard Worker</PRE>
494*5e7646d2SAndroid Build Coastguard Worker
495*5e7646d2SAndroid Build Coastguard Worker<P>The directives inside the <TT>Limit</TT> subsection can use any of the normal limiting directives: <A HREF="man-cupsd.conf.html#Allow"><TT>Allow</TT></A>, <A HREF="man-cupsd.conf.html#AuthType"><TT>AuthType</TT></A>, <A HREF="man-cupsd.conf.html#Deny"><TT>Deny</TT></A>, <A HREF="man-cupsd.conf.html#Encryption"><TT>Encryption</TT></A>, <A HREF="man-cupsd.conf.html#Require"><TT>Require</TT></A>, and <A HREF="man-cupsd.conf.html#Satisfy"><TT>Satisfy</TT></A>. <A HREF="#TABLE02">Table 2</A> lists some basic "recipes" for different access control rules.</P>
496*5e7646d2SAndroid Build Coastguard Worker
497*5e7646d2SAndroid Build Coastguard Worker<DIV CLASS="table"><TABLE WIDTH="80%" SUMMARY="Access Control Recipes">
498*5e7646d2SAndroid Build Coastguard Worker<CAPTION>Table 2: <A NAME="TABLE02">Access Control Recipes</A></CAPTION>
499*5e7646d2SAndroid Build Coastguard Worker<THEAD>
500*5e7646d2SAndroid Build Coastguard Worker<TR>
501*5e7646d2SAndroid Build Coastguard Worker	<TH>Access Level</TH>
502*5e7646d2SAndroid Build Coastguard Worker	<TH>Directives to Use</TH>
503*5e7646d2SAndroid Build Coastguard Worker</TR>
504*5e7646d2SAndroid Build Coastguard Worker</THEAD>
505*5e7646d2SAndroid Build Coastguard Worker<TBODY>
506*5e7646d2SAndroid Build Coastguard Worker<TR>
507*5e7646d2SAndroid Build Coastguard Worker	<TD>Allow Everyone</TD>
508*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>Order deny,allow
509*5e7646d2SAndroid Build Coastguard WorkerAllow from all</PRE></TD>
510*5e7646d2SAndroid Build Coastguard Worker</TR>
511*5e7646d2SAndroid Build Coastguard Worker<TR>
512*5e7646d2SAndroid Build Coastguard Worker	<TD>Allow Everyone on the Local Network</TD>
513*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>Order deny,allow
514*5e7646d2SAndroid Build Coastguard WorkerAllow from @LOCAL</PRE></TD>
515*5e7646d2SAndroid Build Coastguard Worker</TR>
516*5e7646d2SAndroid Build Coastguard Worker<TR>
517*5e7646d2SAndroid Build Coastguard Worker	<TD>Deny Everyone/Disable Operation(s)</TD>
518*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>Order deny,allow</PRE></TD>
519*5e7646d2SAndroid Build Coastguard Worker</TR>
520*5e7646d2SAndroid Build Coastguard Worker<TR>
521*5e7646d2SAndroid Build Coastguard Worker	<TD>Require Login (System) Password</TD>
522*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>AuthType Basic</PRE></TD>
523*5e7646d2SAndroid Build Coastguard Worker</TR>
524*5e7646d2SAndroid Build Coastguard Worker<TR>
525*5e7646d2SAndroid Build Coastguard Worker	<TD>Require CUPS (lppasswd) Password</TD>
526*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>AuthType BasicDigest</PRE></TD>
527*5e7646d2SAndroid Build Coastguard Worker</TR>
528*5e7646d2SAndroid Build Coastguard Worker<TR>
529*5e7646d2SAndroid Build Coastguard Worker	<TD>Require Kerberos</TD>
530*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>AuthType Negotiate</PRE></TD>
531*5e7646d2SAndroid Build Coastguard Worker</TR>
532*5e7646d2SAndroid Build Coastguard Worker<TR>
533*5e7646d2SAndroid Build Coastguard Worker	<TD>Require the Owner of a Job or Subscription</TD>
534*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>Require user @OWNER</PRE></TD>
535*5e7646d2SAndroid Build Coastguard Worker</TR>
536*5e7646d2SAndroid Build Coastguard Worker<TR>
537*5e7646d2SAndroid Build Coastguard Worker	<TD>Require an Administrative User</TD>
538*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>Require user @SYSTEM</PRE></TD>
539*5e7646d2SAndroid Build Coastguard Worker</TR>
540*5e7646d2SAndroid Build Coastguard Worker<TR>
541*5e7646d2SAndroid Build Coastguard Worker	<TD>Require Member of Group "foogroup"</TD>
542*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>Require user @foogroup</PRE></TD>
543*5e7646d2SAndroid Build Coastguard Worker</TR>
544*5e7646d2SAndroid Build Coastguard Worker<TR>
545*5e7646d2SAndroid Build Coastguard Worker	<TD>Require "john" or "mary"</TD>
546*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>Require user john mary</PRE></TD>
547*5e7646d2SAndroid Build Coastguard Worker</TR>
548*5e7646d2SAndroid Build Coastguard Worker<TR>
549*5e7646d2SAndroid Build Coastguard Worker	<TD>Require Encryption</TD>
550*5e7646d2SAndroid Build Coastguard Worker	<TD><PRE>Encryption Required</PRE></TD>
551*5e7646d2SAndroid Build Coastguard Worker</TR>
552*5e7646d2SAndroid Build Coastguard Worker</TABLE></DIV>
553*5e7646d2SAndroid Build Coastguard Worker
554*5e7646d2SAndroid Build Coastguard Worker
555*5e7646d2SAndroid Build Coastguard Worker<H3>Creating a Policy for a Computer Lab</H3>
556*5e7646d2SAndroid Build Coastguard Worker
557*5e7646d2SAndroid Build Coastguard Worker<P>One common operating scenario is a computer lab. The lab is managed by one or more technicians that assist the users of the lab and handle the basic administration tasks. <A HREF="#LISTING02">Listing 2</A> shows an operation policy that only allows access from the lab's subnet, 10.0.2.x, and allows the lab technicians, who are members of a special UNIX group for that lab called "lab999", to do job, printer, and subscription management operations.</P>
558*5e7646d2SAndroid Build Coastguard Worker
559*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="example">
560*5e7646d2SAndroid Build Coastguard Worker<EM>Listing 2: <A NAME="LISTING02">Operation Policy for a Lab</A></EM>
561*5e7646d2SAndroid Build Coastguard Worker
562*5e7646d2SAndroid Build Coastguard Worker 1    &lt;Policy lab999>
563*5e7646d2SAndroid Build Coastguard Worker 2      # Job- and subscription-related operations must be done
564*5e7646d2SAndroid Build Coastguard Worker      by the owner, a lab technician, or an administrator...
565*5e7646d2SAndroid Build Coastguard Worker 3      &lt;Limit Send-Document Send-URI Hold-Job Release-Job
566*5e7646d2SAndroid Build Coastguard Worker      Restart-Job Purge-Jobs Set-Job-Attributes
567*5e7646d2SAndroid Build Coastguard Worker      Create-Job-Subscription Renew-Subscription
568*5e7646d2SAndroid Build Coastguard Worker      Cancel-Subscription Get-Notifications Reprocess-Job
569*5e7646d2SAndroid Build Coastguard Worker      Cancel-Current-Job Suspend-Current-Job Resume-Job
570*5e7646d2SAndroid Build Coastguard Worker      CUPS-Move-Job Cancel-Job CUPS-Authenticate-Job CUPS-Get-Document>
571*5e7646d2SAndroid Build Coastguard Worker 4        Require user @OWNER @lab999 @SYSTEM
572*5e7646d2SAndroid Build Coastguard Worker 5        Order allow,deny
573*5e7646d2SAndroid Build Coastguard Worker 6        Allow from 10.0.2.0/24
574*5e7646d2SAndroid Build Coastguard Worker 7      &lt;/Limit>
575*5e7646d2SAndroid Build Coastguard Worker 8
576*5e7646d2SAndroid Build Coastguard Worker 9      # All administration operations require a lab technician
577*5e7646d2SAndroid Build Coastguard Worker      or an administrator to authenticate...
578*5e7646d2SAndroid Build Coastguard Worker10      &lt;Limit Pause-Printer Resume-Printer
579*5e7646d2SAndroid Build Coastguard Worker      Set-Printer-Attributes Enable-Printer Disable-Printer
580*5e7646d2SAndroid Build Coastguard Worker      Pause-Printer-After-Current-Job Hold-New-Jobs
581*5e7646d2SAndroid Build Coastguard Worker      Release-Held-New-Jobs Deactivate-Printer Activate-Printer
582*5e7646d2SAndroid Build Coastguard Worker      Restart-Printer Shutdown-Printer Startup-Printer
583*5e7646d2SAndroid Build Coastguard Worker      Promote-Job Schedule-Job-After CUPS-Accept-Jobs
584*5e7646d2SAndroid Build Coastguard Worker      CUPS-Reject-Jobs CUPS-Set-Default>
585*5e7646d2SAndroid Build Coastguard Worker11        AuthType Default
586*5e7646d2SAndroid Build Coastguard Worker12        Require user @lab999 @SYSTEM
587*5e7646d2SAndroid Build Coastguard Worker13        Order allow,deny
588*5e7646d2SAndroid Build Coastguard Worker14        Allow from 10.0.2.0/24
589*5e7646d2SAndroid Build Coastguard Worker15      &lt;/Limit>
590*5e7646d2SAndroid Build Coastguard Worker16
591*5e7646d2SAndroid Build Coastguard Worker17      # All other operations are allowed from the lab network...
592*5e7646d2SAndroid Build Coastguard Worker18      &lt;Limit All>
593*5e7646d2SAndroid Build Coastguard Worker19        Order allow,deny
594*5e7646d2SAndroid Build Coastguard Worker20        Allow from 10.0.2.0/24
595*5e7646d2SAndroid Build Coastguard Worker21      &lt;/Limit>
596*5e7646d2SAndroid Build Coastguard Worker22    &lt;/Policy>
597*5e7646d2SAndroid Build Coastguard Worker</PRE>
598*5e7646d2SAndroid Build Coastguard Worker
599*5e7646d2SAndroid Build Coastguard Worker
600*5e7646d2SAndroid Build Coastguard Worker<H2 CLASS="title"><A NAME="SELECT">Using Policies</A></H2>
601*5e7646d2SAndroid Build Coastguard Worker
602*5e7646d2SAndroid Build Coastguard Worker<P>Once you have created a policy, you can use it in two ways. The first way is to assign it as the default policy for the system using the <A HREF="man-cupsd.conf.html#DefaultPolicy"><TT>DefaultPolicy</TT></A> directive in the <VAR>cupsd.conf</VAR> file. For example, add the following line to the <VAR>cupsd.conf</VAR> file to use the "lab999" policy from the previous section:</P>
603*5e7646d2SAndroid Build Coastguard Worker
604*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="example">
605*5e7646d2SAndroid Build Coastguard WorkerDefaultPolicy lab999
606*5e7646d2SAndroid Build Coastguard Worker</PRE>
607*5e7646d2SAndroid Build Coastguard Worker
608*5e7646d2SAndroid Build Coastguard Worker<P>To associate the policy with one or more printers, use either the <A HREF="man-lpadmin.html">lpadmin(8)</A> command or the web interface to change the operation policy for each printer. When using the <B>lpadmin</B> command, the <TT>-o printer-op-policy=name</TT> option sets the operation policy for a printer. For example, enter the following command to use the "lab999" policy from the previous section with a printer named "LaserJet4000":</P>
609*5e7646d2SAndroid Build Coastguard Worker
610*5e7646d2SAndroid Build Coastguard Worker<PRE CLASS="command">
611*5e7646d2SAndroid Build Coastguard Workerlpadmin -p LaserJet4000 -o printer-op-policy=lab999
612*5e7646d2SAndroid Build Coastguard Worker</PRE>
613*5e7646d2SAndroid Build Coastguard Worker
614*5e7646d2SAndroid Build Coastguard Worker<P>To make the same change in the web interface, go to the printer's web page, for example "http://localhost:631/printers/LaserJet4000", and choose <VAR>Set Default Options</VAR> from the <VAR>Administration</VAR> menu button. Click on the <VAR>Policies</VAR> link and choose the desired policy from the pull-down list. Click on <VAR>Set Default Options</VAR> to change the policy for the printer.</P>
615*5e7646d2SAndroid Build Coastguard Worker
616*5e7646d2SAndroid Build Coastguard Worker</BODY>
617*5e7646d2SAndroid Build Coastguard Worker</HTML>
618