CUPS

From XennisWiki
Jump to: navigation, search

CUPS (formerly an acronym for Common UNIX Printing System) is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printer. (Wikipedia)

Installation

Arch Linux

pacman -S cups

Debian

apt-get install cups

Setup

Arch Linux

Add a user to these groups to access the http://localhost:631/admin

usermod -aG sys <user>

Enable and start the service org.cups.cupsd.service.

Samba setup

Install Samba

pacman -S samba

Create a configuration by the default configuration from the Samba Git repository and verify the configuration

curl 'https://git.samba.org/samba.git/?p=samba.git;a=blob_plain;f=examples/smb.conf.default;hb=HEAD' > /tmp/smb.conf.default
mv /tmp/smb.conf.default /etc/samba/smb.conf
testparm

Create a user for samba (here named samba)

useradd samba
smbpasswd -a samba
# For security reasons: Disable shell and SSH logons
usermod --shell /usr/bin/nologin --lock samba
# echo "DenyUsers samba" >> vim /etc/ssh/sshd_conf

Start the service: smd.service.

Debian

Add your user to the lpadmin group and restart CUPS

sudo usermod -aG lpadmin <username>
sudo /etc/init.d/cups restart

Configuration

Open http://localhost:631/admin

Add a printer

For instance setup a printer connected to a FritzBox (host fritz.box, port 9100)

  • Select Add Printer (login with your normal computer account)
  • Other Network Printers > choose AppSocket/HP JetDirect
  • Enter socket://fritz.box:9100 as Connection
  • Follow the remaining instructions

Errors and problems

Unable to send data to printer.

Error message
Paused – “Unable to send data to printer.”
Solution
  • Open CUPS UI, go to printers and select the printer
  • Select Maintenance > Resume Printer

External links