How to stop Ubuntu 20.04 from auto-adding network printers

I noticed something odd today while using a new laptop with Ubuntu 20.04 installed: A network printer was automatically detected and installed without any intervention on my part. The laptop was connected to a WiFi network where the screen was locked for a few minutes. When I came back I found a notification waiting for me on the login screen about a new printer. The notification disappeared after I entered my unlock password or I'd have included an image here.


What It Looks Like

Disable Auto-adding of Network Printers

Fortunately for me has a thread on how to disable the network printer auto add 'feature'. The solution is to disable the cups-browsed service:

  • systemctl stop cups-browsed
  • systemctl disable cups-browsed

One other thing

I noticed that my installation of Ubuntu 20.04.1 did not enable the firewall out of the box, so I did this to enable the firewall with the simplified GUI to control it:

  • sudo apt install gufw
  • Open the Firewall Configuration utility

  • Set the firewall to 'on' for the Public profile