7

I work in a large office building with hundreds of other computers on the same LAN. I don't have any reason to communicate with most of these computers, and when I do, it's always on an "opt-in" basis (like adding a network mount to my fstab). But Linux Mint is automatically adding printers throughout the building, and the "Network" sidebar in my file manager is filled with computers that belong to people I don't know. Finally, /var/log/syslog is filled with entries like the following, that make it difficult to find issues of real importance:

org.gtk.vfs.Daemon[2500]: ** (process:6388): WARNING **: Failed to resolve service name 'XXX': Too many objects
avahi-daemon[872]: dbus-protocol.c: Too many objects for client ':1.65', client request failed.

I would like to disable this automatic discovery of services, especially printers and network shares. I also would like to ensure that my computer is not automatically broadcasting any information about itself to the rest of the LAN.

What steps should I take to do this? Is it sufficient to disable avahi-daemon?

cxrodgers
  • 223
  • 1
  • 2
  • 10
  • 1
    That depends on exactly how these devices are discovered. Yes, first guess (and first step) would be to disable avahi. If you still have devices/printers after that, next step is to investigate why those show up. – dirkt Oct 19 '18 at 06:24
  • Disabling the avahi-daemon in toto may deprive you of other (than print) services, which you may still want or need. – Kurt Pfeifle Dec 24 '18 at 23:43

1 Answers1

3
  1. Stop the CUPS service (embodied by a process called cupsd), for example

    sudo service cups stop
    
  2. Open /etc/cups/cupsd.conf in your favorite editor, for example

    sudo vim /etc/cups/cupsd.conf
    
  3. Look if there is a line in this file saying

    Browsing  Yes
    

    and change this line to

    Browsing  No
    

    This should disable the sharing of your own print queues installed locally with the other computers in the same network. (I'm simply assuming you do not want this, given that you also do not want to 'see' other printers shared by other computers...)

  4. Likewise, make sure that file has the following lines:

    BrowseLocalProtocols  none
    BrowseDNSSDSubTypes  none
    DefaultShared  No
    

    The first two should disable the automatic addition of printers shared on the network.

  5. Now start the CUPS service again, for example

    sudo service cups start
    
Kurt Pfeifle
  • 1,401
  • 1
  • 12
  • 15
  • My cupsd.conf has "Browsing Off" instead of "Browsing No", do you know if this is an acceptable synonym? – cxrodgers Jan 29 '19 at 17:45
  • 1
    @cxrodgers: Haven't tested this recently -- but a few years back this used to be the case for CUPS. Boolean config options had "Yes, yes, True, true, On, on" respectively "No, no, False, false, Off, off" as synonyms. – Kurt Pfeifle Jan 29 '19 at 20:44
  • 1
    In a more recent version of Linux, I now need to also modify cups-browsed.conf to set "BrowseProtocols none" and/or disable the cups-browsed service – cxrodgers Apr 04 '21 at 19:08