ubuntu安裝cups打印機(jī)服務(wù),并配置權(quán)限
1 安裝
sudo apt install cups
sudo systemctl start cups
sudo systemctl enable cups
systemctl status cups\
2 配置
sudo vim /etc/cups/cupsd.conf
修改以下內(nèi)容
# Only listen for connections from the local machine.
Port 631
Listen /run/cups/cups.sock
# Show shared printers on the local network.
Browsing Yes
BrowseLocalProtocols dnssd
<Location />
Allow from 192.168.2.17
Order allow,deny
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
Allow from 192.168.2.17
</Location>
# Restrict accessAuthType Default
<Location /admin/conf>
Allow from 192.168.2.17
Order allow,deny
</Location>
# Restrict access to log files...
<Location /admin/log>
Order allow,deny
Allow from 192.168.2.17
</Location>
3 添加權(quán)限
sudo usermod -aG lpadmin $USER
4 日志查看,如果使用過程中需要查看日志
sudo tail -f /var/log/cups/error_log