首页 > 其他分享 >Rocky9.4 安装CUPS

Rocky9.4 安装CUPS

时间:2024-09-30 14:48:18浏览次数:7  
标签:deny Require AuthType Rocky9.4 user allow CUPS 安装 Order

1.安装CUPS
sudo yum install cups && sudo yum install foomatic-filters

2.配置 cups

[root@docker-elk cups]# cat /etc/cups/cupsd.conf |sed '/^#/d;/^$/d' /etc/cups/cupsd.conf
LogLevel warn
MaxLogSize 1m
ErrorPolicy stop-printer
Listen 192.168.60.197:631
Listen localhost:631
Listen /run/cups/cups.sock
Browsing On
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes
IdleExitTimeout 0
<Location />
  Allow from 192.168.61.0/24
  Order allow,deny
</Location>
</Location>
AuthType Basic
AuthName "CUPS Admin"
AuthUserFile /etc/cups/passwd
Require user 4158dc85620bd1715fcf911b92b97ae4
<Location /admin>
  Allow from 192.168.61.0/24
  Order allow,deny
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @ALL
  Order allow,deny
</Location>
<Location /admin/log>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>
<Policy default>
  # Job/subscription privacy...
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    Order deny,allow
  </Limit>
  <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 Cancel-My-Jobs Close-Job CUPS-Move-Job>
    Require user @ALL
    Order deny,allow
  </Limit>
  <Limit CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  # All printer operations require a printer operator to authenticate...
  <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 Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
<Policy authenticated>
  # Job/subscription privacy...
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Default
    Order deny,allow
  </Limit>
  <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 Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  # All printer operations require a printer operator to authenticate...
  <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 Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
<Policy kerberos>
  # Job/subscription privacy...
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Negotiate
    Order deny,allow
  </Limit>
  <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 Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Negotiate
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  # All printer operations require a printer operator to authenticate...
  <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 Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Negotiate
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

3.测试一下安装是否完成(自己记得开启631端口的防火墙哈)
curl 127.0.0.1:631
4.添加打印机

标签:deny,Require,AuthType,Rocky9.4,user,allow,CUPS,安装,Order
From: https://www.cnblogs.com/Rohing/p/18441807

相关文章

  • Rocky9.2安装docker-docker-compose
    1.更换阿里云源(不换下载很慢)sed-e's|^mirrorlist=|#mirrorlist=|g'-e's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g'-i.bak/etc/yum.repos.d/rocky-*.repodnfmakecache2.更新系统包sud......
  • WLAN无线网卡驱动安装教程
    火影官方驱动下载地址下载WLAN无线网卡驱动下载完成后点击全部解压缩解压完成后有一个安装说明,查看自己的网卡是什么品牌的,不知道就一个一个的全部都安装一遍安装过程不用管显示什么,结束了就进行下一个就行全部运行安装过一遍后重启查看是否有WiFi开关......
  • Proe 5.0资源百度网盘下载 附详细安装步骤
    如大家所了解的,Proe又称作Pro/E,是比较常用的CAD/CAM/CAE软件之一,也是一款功能齐全的模具和产品设计三维的工具。Proe在传统机械设计、家电设计以及模具设计方面,优势很突出。首先,建模采用参数化设计,无论多么复杂的几何模型,都可以分解成有限数量的构成特征。其次单一的数据库管......
  • 【PR2024】Adobe Premiere Pro视频编辑软件下载安装与pr教程(附下载链接)
    AdobePremiere简介AdobePremierePro(PR)是由Adobe公司开发的一款专业视频编辑软件,广泛应用于电影、电视、广告、网络视频等领域。该软件提供了完整的视频编辑流程,使用户能够导入、编辑和处理各种视频、音频和图像文件,包括剪辑、裁剪、添加过渡效果、特效、文本、音乐和声音等......
  • 在 win10 2021 LTSC 上安装配置 wsl2 和 ubuntu
    在win102021LTSC上安装配置wsl2和ubuntu的过程:参考官方文档:https://learn.microsoft.com/zh-cn/windows/wsl/install-manual(最后一步安装ubuntu发行版时,请自己解压,然后拷贝到其他目录再运行ubuntu.exe,否则默认放到了c盘)win10系统启用wsl2:wsl--install----......
  • CentOS 7.6无脑安装OpenSSL 1.1.1
    跳转到安装目录cd/home下载OpenSSL1.1.1源代码:访问OpenSSL的官方网站或GitHubreleases页面,找到并下载OpenSSL1.1.1的源代码压缩包(通常是.tar.gz格式)wgethttps://www.openssl.org/source/openssl-1.1.1.tar.gz解压源代码:使用tar命令解压下载的压缩包,并......
  • CentOS 7.6无脑安装Python 3.11.9
    更新系统软件包:运行以下命令来更新系统上的所有软件包:sudoyumupdate-ysudoyumgroupinstall-y"DevelopmentTools"sudoyuminstall-ybzip2-develexpat-develgdbm-devel\ncurses-developenssl-develreadline-devel\sqlite-develzlib-develxz-develli......
  • Windows平台下安装与配置MySQL9
    Windows平台下安装与配置MySQL9 要在Windows平台下安装MySQL,可以使用图行化的安装包。图形化的安装包提供了详细的安装向导,以便于用户一步一步地完成对MySQL的安装。本节将详细介绍使用图形化安装包安装MySQL的方法。1.2.1 安装MySQL要想在Windows中运行MySQL,需要32位或6......
  • 怎么安装PbootCMS?
    环境准备:确保服务器环境满足PHP和数据库的要求。上传并解压源码:将源码上传并解压到安装目录。访问后台:浏览器访问 域名/admin.php。基础设置:不建议填写站点域名。授权管理:从官网申请授权码并粘贴到后台。系统账号密码修改:在后台右上角修改密......
  • VM--VSphere 7安装部署 (详细教程 EXSI+VCenter)
    目录一、Vsphere7简介二、Vsphere7.0安装部署    2.1服务器阵列卡配置安装  2.1.1服务器配置磁盘阵列2.1.2创建磁盘阵列2.1.3选取硬盘2.1.4选择RAID方式2.2VMwareESXi系统安装2.2.1 选择启动项2.2.2进入系统安装2.2.3确认安装2.2.4接受许可2.2.5......