The Windows April 2018 update somehow broke the printer drivers on my girlfriends laptop. After an hour of trying to reinstall them without success i decided that maybe a CUPS server running on my Raspberry Pi would do the trick. Since it is already an important part of my network infrastructure, it should’nt hurt to give it that job too.

Getting a CUPS server up and running is surprisingly easy. Just run

$ apt install cups

and you are good to go. When it is done, you just have to add some lines to the config file in /etc/cups/cupsd.conf:

# Only listen for connections from the local machine.
- Listen: localhost:631
+ Port 631

# Show shared printers on the local network.
Browsing On
BrowseLocalProtocols dnssd
+ BrowseAddress @LOCAL

...

# Restrict access to the server...
<Location />
  Order allow,deny
+  ALLOW @LOCAL
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
+  ALLOW @LOCAL
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
+  ALLOW @LOCAL
</Location>

# Restrict access to log files...
<Location /admin/log>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
+  ALLOW @LOCAL
</Location>

...

Thats it. Now systemctl enable cups && systemctl start cups and you can configure your printer via the web UI. After doing so and adding the printer to Windows via CUPS the laptop is finally printing again. I f*ing hate Windows.

Jan