In this article, I will share with you about my second time installing CUPS on Ubuntu.

Requriement

  • Ubuntu 18.04 LTS Install on an Old Computer
  • Canon E410 Series Printer
  • Internet

CUPS Installation and Configuration Step by Step

  • Install CUPS on your system
#install cups
sudo apt-get install cups cups-pdf cups-bsd 
  • Back up the configuration file
#copy configuration file
sudo cp /etc/cups/cupsd.conf cupsd.conf.bak
  • Editing the CUPS configuration file
#add user simith to lpadmin group
sudo usermod -aG lpadmin simith
#edit cupsd.conf
sudo vim cupsd.conf
  • Edited cupsd.conf contents.
    (Configuration options not mentioned should be left as default.)
#allow access port
Port 63100
LogLevel warn
PageLogFormat
MaxLogSize 200

# Show shared printers on the local network.
Browsing on
BrowseLocalProtocols dnssd

# Web interface setting...
WebInterface Yes

# Restrict access to the server...
<Location />
  Order Allow,deny
  Allow @LOCAL
  Allow From 127.0.0.1
  Allow From 192.168.0.0/16
</Location>

# Restrict access to the admin pages...
<Location /admin>
 #access user simith can visit admin page
  Require user simith
  Order Allow,deny
  Allow @LOCAL
  Allow 127.0.0.1
  Allow From 192.168.0.0/16
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user simith
  Order allow,deny
  Allow @LOCAL
  Allow 127.0.0.1
  Allow From 192.168.0.0/16
</Location>

# Restrict access to log files...
<Location /admin/log>
  AuthType Default
  Require user simith
  Order allow,deny
  Allow @LOCAL
  Allow 192.168.0.0/16
</Location>
  • Restart CUPS service and add to starup
sudo systemctl restart cups
sudp systemctl enable cups

End

Finally, you can visit the Ubuntu IP address and configuration

Example: " http:// ubuntu ip address:63100 "

Another article

打印服务器cups安装笔记
https://www.itiohub.com/log/413.html