Debian 安装CUPS操作

1,输入以下命令,安装 cups 及驱动包:

复制代码
sudo apt-get update
sudo apt-get install cups
sudo apt install printer-driver-gutenprint

2,输入下面的命令,进入 cups 的配置文件编辑界面(nano 修改后 Ctrl+S 保存、Ctrl+X 退出):

复制代码
sudo nano /etc/cups/cupsd.conf

3,首先将下面代码中的 localhost 改为 0.0.0.0

复制代码
Listen localhost:631

然后在以下 4 段代码中加入 Allow all,加完效果如下:

复制代码
# Restrict access to the server...
<Location />
  Order allow,deny
  Allow all
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow all
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow all
</Location>

# Restrict access to log files...
<Location /admin/log>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow all
</Location>

最后 Ctrl+S 保存、Ctrl+X 退出

4,将用户加入管理员权限(不加后面无法进入cups管理员界面)

复制代码
sudo usermod -a -G lpadmin 您的用户名

例如,你的用户名为 bruce,那么就输入如下指令:

复制代码
sudo usermod -a -G lpadmin bruce

至此CUPS准备工作完成。

相关推荐
orion571 天前
Missing Semester Class1:course overview and introduction of shell
linux
用户120487221611 天前
Linux驱动编译与加载
linux·嵌入式
程序员老赵1 天前
服务器文件不想 SFTP 上传?Docker 跑个 File Browser,浏览器就能管理
服务器·docker·开源
vivo互联网技术2 天前
从 10 分钟到 1 秒:ES 深度分页任意跳页的三轮优化实战
服务器·数据库·redis·elasticsearch·深度分页
用户805533698032 天前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户805533698032 天前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
七歌杜金房2 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
tntxia3 天前
linux curl命令详解_curl详解
linux
扛枪的书生3 天前
Linux 网络管理器用法速查
linux