Tuesday, August 5, 2025

Create a CUPS / Linux Print Server

 # Download debian net inst ISO
https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.11.0-amd64-netinst.iso

# Create a bootable USB stick
```bash
sudo dd if=debian-12.11.0-amd64-netinst.iso of=/dev/sda bs=4M status=progress oflag=sync
```

# Update 
```bash
sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -y
```
# Install Printing Service
```bash
sudo apt install cups
sudo apt install avahi-daemon
sudo systemctl enable --now avahi-daemon
sudo ufw allow 631 # if using ufw
```

## Cups
Cups is accessible from your browser:
http://localhost:631

**Add admin access**
```bash
sudo nano /etc/cups/cupsd.conf
------------------------------
# Listen on all interfaces
Port 631
Listen 0.0.0.0:631
ServerAlias *

# Enable printer discovery on the local network
Browsing On
BrowseLocalProtocols dnssd

# Access control for general browsing/printing
<Location />
  Order allow,deny
  Allow @LOCAL
</Location>

# Access control for the admin pages
<Location /admin>
  Order allow,deny
  Allow @LOCAL
</Location>

# Access control for the admin operations (adding/removing printers)
# <Location /admin/conf>
#  AuthType Default
#  Require user @SYSTEM
#  Order allow,deny
#  Allow @LOCAL
# </Location>


------------------------------
sudo systemctl restart cups
```
**For usb printers, we might need two print tools**
```bash
sudo apt install printer-driver-gutenprint foomatic-db
# we can install ssh access too
sudo apt install openssh-server
# On both client and server
sudo systemctl restart cups
sudo systemctl restart avahi-daemon
```

## Install Printer Driver if needed
*I am using an old usb printer Brother L2310D*
*This is the main reason for my print server*
*My new box, cannot handle task forwarding on it, like the old Freebox*

https://support.brother.com/g/b/downloadlist.aspx?c=eu_ot&lang=en&prod=hll2310d_us_eu_as&os=128#SelectLanguageType-10283_0_1
*By clicking on the driver, all the instructions are there.*
*Normally we don't need to do this*

```bash
# This can work too
sudo apt install printer-driver-brlaser
```

# PCs that want to print need to have these installed 
*normally it is the case for ubuntu / debian / fedora*
```bash
sudo apt install cups avahi-daemon printer-driver-brlaser
sudo systemctl enable --now cups
sudo systemctl enable --now avahi-daemon
```

Finally you also have to make sure that your PC is not simply looking for a printer on another PC, because this will cause printer confusion. It should look for a print server, so the printing data will be comprehensible when it arrives to the printer. Normally on windows I especially for a network printer I would use a specific driver on the server and generic drivers on the clients. Often in Linux this is not possible, because the generic driver installs come back with an error. 

```bash
sudo nano /etc/cups/client.conf
----------

ServerName 192.168.1.83     # your printserver IP

```

So now, normally, when you simply do a printer search your PC should auto detect the printer. 
Normally, even windows devices would be dtecting it. 
If not, just add printer and try using IPP.
If not, use the TCP/IP section and add your servers IP.


Sharepoint sync and lock issues - solutions

 Sharepoint synced down to your PC by onedrive can have a ton of errors. It is caused by the simple dis-functionality of this badly thought ...