Printer settings in /etc/cups/cupsd.conf (just the most relevant sections to get you started):
# Only listen for connections from the local machine.
Listen localhost:631
Listen 192.168.1.77:631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing Off
BrowseProtocols cups
BrowseOrder Deny,Allow
BrowseAllow from @LOCAL
BrowseAllow from @IF(eth1)
# Default authentication type, when authentication is required…
DefaultAuthType Basic
# Restrict access to the server…
<Location />
Require valid-user
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.1.0/24
</Location>
# Restrict access to the admin pages…
<Location /admin>
#Require valid-user
Require group printadmins
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.1.0/24
</Location>
Then reload the configuration:
service cups reload
Plug the printer into the USB (if it isn’t already).
Next, from your browser bring up the Cups Printer Administration tool, running on the Slug’s port 631:
lynx http://slug:631
and follow the steps there to detect and the printer that is connected to the slug. After that is done you’ll find a printers.conf in /etc/cups directory, containing details of your printer.
Accessing your printer
You can access your printer via IPP. In Ubuntu 8.10, under add New Printer, select “Internet Printing Protocol” and specify the URI. For example, ipp://slug:631/printers/Samsung_ML-2010
Sharing Printers via Samba
Printer settings in global section in /etc/smb.conf::
[global]
…
load printers = yes
printing = cups
printcap name = cups
cups options = raw
…
My printers section in /etc/smb.conf:
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
read only = yes
create mask = 0700
use client driver = yes;
admin users = @printadmins
# If you want anyone to be able to use your printer then keep this:
guest ok = yes
# If you want to restrict users, then comment out above and uncomment this (make sure user1 is in the samba db).
;valid users = user1