ubuntu安裝cups

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

5 記得打開宿主機(jī)防火墻

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容