Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.11 KB | None | 0 0
  1. $ cat /etc/cups/cupsd.conf
  2.  
  3. #
  4. #
  5. # Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
  6. # complete description of this file.
  7. #
  8.  
  9. # Log general information in error_log - change "warn" to "debug"
  10. # for troubleshooting...
  11. LogLevel warn
  12.  
  13. # Deactivate CUPS' internal logrotating, as we provide a better one, especially
  14. # LogLevel debug2 gets usable now
  15. MaxLogSize 0
  16.  
  17. # Administrator user group...
  18. SystemGroup lpadmin
  19.  
  20.  
  21. # Only listen for connections from the local machine.
  22. Listen localhost:631
  23. Listen /var/run/cups/cups.sock
  24.  
  25. # Show shared printers on the local network.
  26. Browsing On
  27. BrowseOrder allow,deny
  28. BrowseAllow all
  29. BrowseLocalProtocols CUPS dnssd
  30.  
  31. # Default authentication type, when authentication is required...
  32. DefaultAuthType Basic
  33.  
  34. # Restrict access to the server...
  35. <Location />
  36.   Order allow,deny
  37. </Location>
  38.  
  39. # Restrict access to the admin pages...
  40. <Location /admin>
  41.   Order allow,deny
  42. </Location>
  43.  
  44. # Restrict access to configuration files...
  45. <Location /admin/conf>
  46.   AuthType Default
  47.   Require user @SYSTEM
  48.   Order allow,deny
  49. </Location>
  50.  
  51. # Set the default printer/job policies...
  52. <Policy default>
  53.   # Job-related operations must be done by the owner or an administrator...
  54.   <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
  55.     Require user @OWNER @SYSTEM
  56.     Order deny,allow
  57.   </Limit>
  58.  
  59.   # All administration operations require an administrator to authenticate...
  60.   <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
  61.     AuthType Default
  62.     Require user @SYSTEM
  63.     Order deny,allow
  64.   </Limit>
  65.  
  66.   # All printer operations require a printer operator to authenticate...
  67.   <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
  68.     AuthType Default
  69.     Require user @SYSTEM
  70.     Order deny,allow
  71.   </Limit>
  72.  
  73.   # Only the owner or an administrator can cancel or authenticate a job...
  74.   <Limit Cancel-Job CUPS-Authenticate-Job>
  75.     Require user @OWNER @SYSTEM
  76.     Order deny,allow
  77.   </Limit>
  78.  
  79.   <Limit All>
  80.     Order deny,allow
  81.   </Limit>
  82. </Policy>
  83.  
  84. # Set the authenticated printer/job policies...
  85. <Policy authenticated>
  86.   # Job-related operations must be done by the owner or an administrator...
  87.   <Limit Create-Job Print-Job Print-URI>
  88.     AuthType Default
  89.     Order deny,allow
  90.   </Limit>
  91.  
  92.   <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
  93.     AuthType Default
  94.     Require user @OWNER @SYSTEM
  95.     Order deny,allow
  96.   </Limit>
  97.  
  98.   # All administration operations require an administrator to authenticate...
  99.   <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
  100.     AuthType Default
  101.     Require user @SYSTEM
  102.     Order deny,allow
  103.   </Limit>
  104.  
  105.   # All printer operations require a printer operator to authenticate...
  106.   <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
  107.     AuthType Default
  108.     Require user @SYSTEM
  109.     Order deny,allow
  110.   </Limit>
  111.  
  112.   # Only the owner or an administrator can cancel or authenticate a job...
  113.   <Limit Cancel-Job CUPS-Authenticate-Job>
  114.     AuthType Default
  115.     Require user @OWNER @SYSTEM
  116.     Order deny,allow
  117.   </Limit>
  118.  
  119.   <Limit All>
  120.     Order deny,allow
  121.   </Limit>
  122. </Policy>
  123.  
  124. #
  125. #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement