# 在 error_log 中记录一般信息 - 若进行故障排除,请将 "info" 改为 "debug"...
LogLevel info
# 管理员用户组...
SystemGroup wheel
# 在端口 631 上监听连接。
Port 631
#Listen localhost:631
Listen /var/run/cups.sock
# 显示局域网共享的打印机。
Browsing On
BrowseOrder allow,deny
#BrowseAllow @LOCAL
BrowseAllow 192.168.1.* # 更改为本地 LAN 设置
BrowseAddress 192.168.1.* # 更改为本地 LAN 设置
# 需要身份验证时的默认身份验证类型...
DefaultAuthType Basic
DefaultEncryption Never # 注释掉此行以允许加密
# 允许 LAN 上任何计算机访问服务器
<Location />
Order allow,deny
#Allow localhost
Allow 192.168.1.* # 更改为本地 LAN 设置
</Location>
# 允许 LAN 上任何计算机访问管理员页面
<Location /admin>
#要求加密
Order allow,deny
#Allow localhost
Allow 192.168.1.* # 更改为本地 LAN 设置
</Location>
# 允许 LAN 上任何计算机访问配置文件
<Location /admin/conf>
AuthType Basic
Require user @SYSTEM
Order allow,deny
#Allow localhost
Allow 192.168.1.* # 更改为本地 LAN 设置
</Location>
# 设置默认打印机/作业策略...
<Policy default>
# 与作业相关的操作必须由所有者或管理员执行...
<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>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# 所有管理操作都需要管理员身份验证...
<Limit Pause-Printer Resume-Printer Set-Printer-Attributes 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-Add-Printer CUPS-Delete-Printer CUPS-Add-Class \
CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
AuthType Basic
Require user @SYSTEM
Order deny,allow
</Limit>
# 只有所有者或管理员可以取消或认证作业...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>