CUPS: Setting Up a Print Server
Introduction
The Common Unix Printing System (CUPS) is a modular printing system for Unix and Unix-like operating systems. Any computer using CUPS can act as a print server; it can accept documents sent from other machines (client computers), process them, and send them to the appropriate printer.
Installation
The installation is very simple:
aptitude install cupsys cupsys-client cupsys-bsd cupsys-driver-gimpprint samba-client
I’ve included a module for creating PDFs and a package containing drivers.
Configuration
Parallel Ports
This technology is now almost obsolete, so it’s unlikely that you have a printer operating on a parallel port. If like me you don’t need it, disable this option:
# Cups configure options
# LOAD_LP_MODULE: enable/disable to load "lp" parallel printer driver module
LOAD_LP_MODULE=no
cupsd.conf
Now, let’s edit the basic configuration and change it so that we can access it. Here are the lines to replace (in this case my server is 192.168.0.1 in a 192.168.0.0 network):
...
# Only listen for connections from the local machine.
Listen 192.168.0.1:631
...
# Restrict access to the server...
<Location />
Order Deny,Allow
Deny From All
Allow From 192.168.0.*
Allow From @LOCAL
</Location>
...
# Restrict access to the admin pages...
<Location /admin>
AuthType Basic
AuthClass System
Order Deny,Allow
Deny From All
Allow From 192.168.0.*
Allow From @LOCAL
</Location>
Restart the CUPS service afterward.
You can now access the administration interface via: http://192.168.0.1:631 or https://192.168.0.1:631
Administering Printers
To authorize a user account to administer printers, simply add it to the lpadmin group:
adduser username lpadmin
References
Last updated 01 Apr 2010, 12:58 CEST.