CUPS全稱為Common Unix Printing System,是類Unix系統上的通用打印系統,支持本地、遠程打印。CUPS主要有以下組件或子系統組成:

print spooler/scheduler: convert LPD requests to IPP; provide a web-based interface for managing print jobs, configurations

filter system:convert the print data to specified formats

backend system:send data to print devices

示意圖如下:

CUPS Simple

配置文件

[root@cups]# pwd

/etc/cups

[root@cups]# tree

.

├── classes.conf

├── client.conf

├── cupsd.conf --> CUPS服務配置

├── cupsd.conf.default

├── interfaces

├── lpoptions

├── paps.convs

├── ppd

├── printers.conf --> 打印隊列配置

├── snmp.conf

├── ssl

└── subscriptions.conf

3 directories, 10 files

以上配置文件介紹、作用、指令,大都可以使用man file來查看;若還有不明確的,可以訪問CUPS服務的Online Help頁面,內容比較詳細。

認證示例

When you enable remote administration, the server will use Basic authentication for adminstration tasks. The current CUPS server supports Basic, Digest, Kerberos, and local certificate authentication:

Basic authentication essentially places the clear text of the username and password on the network. Since CUPS uses the system username and password account information, the authentication information could be used to gain access to possibly privileged accounts on the server.

Recommendation: Enable encryption to hide the username and password information - this is the default on MacOS X and systems with GNU TLS or OpenSSL installed.

Digest authentication uses an MD5 checksum of the username, password, and domain (“CUPS”), so the original username and password is not sent over the network. The current implementation does not authenticate the entire message and uses the client’s IP address for the nonce value, making it possible to launch “man in the middle” and replay attacks from the same client.

Recommendation: Enable encryption to hide the username and password information.

Local certificate authentication passes 128-bit “certificates” that identify an authenticated user. Certificates are created on-the-fly from random data and stored in files under /var/run/cups/certs. They have restricted read permissions: root + system-group(s) for the root certificate, and lp + lp for CGI certificates. Because certificates are only available on the local system, the CUPS server does not accept local authentication unless the client is connected to the loopback interface (127.0.0.1 or ::1) or domain socket.

Recommendation: Ensure that unauthorized users are not added to the system group(s).

這裡使用”Basic Authentication”介紹下使用系統賬戶訪問CUPS服務的方式。

創建用戶/用戶

[root@cups]# groupadd cupsadmin

[root@cups]# useradd -g cupsadmin -s /sbin/nologin cupsuser

[root@cups]# passwd cupsuser

更改/etc/cups/cupsd.conf配置

[root@cups]# vim /etc/cups/cupsd.conf

... ...

# Administrator user group...

# 2013-05-06 dylanninin@gmail.com customize SystemGroup to cupsadmin

SystemGroup cupsadmin

# Only listen for connections from the local machine.

#Listen localhost:631

# 2013-05-06 dylanninin@gmail.com listen on 631 port of all the interfaces

Listen 631

Listen /var/run/cups/cups.sock

# Show shared printers on the local network.

Browsing On

BrowseOrder allow,deny

BrowseAllow all

BrowseLocalProtocols CUPS dnssd

# Default authentication type, when authentication is required...

DefaultAuthType Basic

# Restrict access to the server...

# 2013-05-06 dylanninin@gmail.com access control

Order allow,deny

Allow all

Require valid-user

Require user @SYSTEM

# Restrict access to the admin pages...

# 2013-05-06 dylanninin@gmail.com access control

Order allow,deny

Allow all

Require valid-user

Require user @SYSTEM

# Restrict access to configuration files...

# 2013-05-06 dylanninin@gmail.com access control

AuthType Default

Require user @SYSTEM

Order allow,deny

Allow all

Require valid-user

Require user @SYSTEM

... ...

重啟CUPS服務

[root@cups]# service cups restart

Stopping cups: [ OK ]

Starting cups: [ OK ]

使用浏覽器打開https://yourhostname:631,輸入用戶名、密碼即可看到管理界面,截圖如下:

linux安装CUPS详细教程,CUPS介紹相关推荐

  1. Linux安装Elasticsearch详细教程

    文章目录 准备工作 开始安装 开启远程访问 安装Kibana 准备工作 下载地址:https://www.elastic.co/cn/downloads/elasticsearch 选择要下载的版本 ...

  2. Linux安装RabbitMQ详细教程Java使用

    目录 一:环境准备 1.RabbitMQ版本 和 Erlang 版本兼容性关系 2.官方安装包下载地址 3.百度云盘下载 提取码:8956 4.安装包中说明,请下载对应的安装包 二.安装操作步骤 1. ...

  3. Linux 安装 nginx 详细教程

    文章目录 Linux 安装 nginx 详细步骤 ①安装依赖包 ②下载并解压安装包 ③安装 nginx ④启动 nginx 服务 ⑤nginx 反向代理 提示:以下是本篇文章正文内容,Linux 系列 ...

  4. Linux安装maven(详细教程)

    一.简介 Maven是意第绪语,意思是"知识的积累者",最初是为了简化Jakarta Turbine项目中的构建过程.有几个项目,每个项目都有自己的Ant构建文件,所有项目都略有不 ...

  5. Linux安装jdk(详细教程)

    一.JDK介绍 JDK是 Java 语言的软件开发工具包,主要用于移动设备.嵌入式设备上的java应用程序.JDK是整个java开发的核心,它包含了JAVA的运行环境(JVM+Java系统类库)和JA ...

  6. Linux安装JDK详细教程

    1.java -version 或 which java 检查系统是否有安装jdk,系统有的话可以卸载,如果是安装的话则删除安装的和相应的环境变量配置 2.uname -r 查看系统的是多少位的,下图 ...

  7. Linux安装Anaconda3详细教程;Linux安装jupyterhub详细教程

    为什么写这篇博客:毕业后小作业!如有错误,希望贵人能留言指正. jupyterhub 本教程基于以下配置完成: 电脑:阿里云虚拟机 操作系统:Linux-CentOS7 Anaconda3安装目录:/ ...

  8. linux安装Oracle11g详细教程(redhat6、Centos7)

    转载请注明:https://blog.csdn.net/u011291276/article/details/108143497 一.摘要 本文是安装Oracle11g的详细步骤: 本人已通过此方式, ...

  9. Linux安装Tomcat详细教程(图文)

    1.下载Linux版本****的Tomcat 下载地址 2.在usr目录下新建tomcat目录,然后将下载的tomcat拷贝到新建的tomcat目录中 创建目录命令:mkdir /usr/tomcat ...

  10. Linux安装tomcat详细教程

    Tomcat是Apache 软件基金会(Apache Software Foundation)的Jakarta 项目中的一个核心项目,由Apache.Sun 和其他一些公司及个人共同开发而成.由于有了 ...

最新文章

  1. [CLR via C#]17. 委托
  2. 使用Leap Motion Orion开发酷炫的手势识别VR/AR应用
  3. 软件测试技术lab2——Selenium上机实验
  4. Spring自定义注解简单使用四步走
  5. 基于abp vnext制作项目脚手架
  6. 吃货阶段01 类的定义 方法的布局 0925
  7. 编程语言python怎么读-Python和Go都很火,我要怎么选?
  8. lightoj 1382 - The Queue(树形dp)
  9. matlab axes坐标轴长度,[转载]Matlab 坐标轴(axes),数据提示(data
  10. ubuntu14上安装ros教程
  11. wp7 XAP部署工具
  12. 深度学习视觉目标跟踪算法毕业论文【matlab】
  13. 中国智能硬件调研报告
  14. 电脑右键的新建怎么没有了
  15. logout退出登录该用get方法还是post方法?
  16. 系统版本aplpha,Beta等表示的意思
  17. office@microsoft365@官方在线安装@第三方离线下载并安装(word+ppt+excel)
  18. 五大创新型AI软件公司,下一个AI独角兽就是你
  19. 一个用 C 语言写的迷你版 2048 游戏,只有 500个字符
  20. XStream学习手册

热门文章

  1. Android5.1-s5p6818平台adb push 、adb install/uninstall的疑问
  2. 学术诚信的重要性_坚守学术道德,弘扬学术诚信
  3. edi系统三要素_EDI标准的三要素是什么?
  4. Zabbix 监控ESXi服务器【非虚拟机】CPU、内存、硬盘、网络带宽
  5. Slider网站欣赏
  6. git中的origin
  7. Python学习-PY4E作业
  8. mysql 字符串转日期
  9. 用python将word转化成pdf
  10. Linux遇到删除不掉的文件或者文件夹解决办法