In this article we’re adding a Samba 3 server to a Workgroup and configuring the Samba server to serve a printer. This article includes CUPS but not Printer Drivers. I’ve made some comments at the end of this article which are worth your time to read if you need direction in that area. Otherwise this article is the Samba and CUPS components only.
The “/etc/samba/smb.conf” file looks like this:
[global] # Give your new printer server a nice name. netbios name = PrinterServer workgroup = WORKGROUP security = share encrypt passwords = yes # Is there already a WINS server on this network? If so, point to it here. wins server = 192.168.1.1 wins proxy = yes [print$] path = /var/samba/drivers/ comment = Printer drivers writeable = yes
Create the printer driver directory:
mkdir /var/samba/drivers/ -p
Configure CUPS by populating the “/etc/cups/cupsd.conf” file with the following:
LogLevel debug SystemGroup lpadmin Port 631 Listen /var/run/cups/cups.sock Browsing On BrowseOrder allow,deny BrowseAddress @LOCAL <Location /> Allow localhost Allow 192.168.*.* Order allow,deny Allow all </Location> <Location /admin> Allow 192.168.*.* Encryption Required Order allow,deny Allow all </Location> <Location /admin/conf> Allow 192.168.*.* Order allow,deny Allow all </Location>
Make sure to restart Samba and CUPS.
Visit the page “https://192.168.1.2:631/” (if 192.168.1.2 is your printer server) with your web browser from the “192.168.” network. You will see the CUPS configuration page.
1. Click “Adding Printers and Classes”.
2. Click “Add printer”.
3. Complete the wizard to add the printer.
The above are the Samba and CUPS components. There are other things to do though. They are:
a) Add the drivers to this Samba server which allows the Windows clients to download them as needed. This part is optional because you ‘can’ get the drivers to the Windows client via the printers driver installer or perhaps Windows already has the drivers you need.
b) Install the printer(s) onto the Windows clients. This should be no different to normal printer installations via a Windows printer server.