Setting up Samba as a Print Server
- 1 Using printers connected to the Samba server
- 2 Providing Printer Drivers to Windows clients with the [print$] share
- 3 Using printers connected to another Samba or Windows server
Using printers connected to the Samba server
In most of the cases you want to use printers which are directly connected to the samba server. A printer can be connected via various hardware devices (i.e. parallel port, usb, scsi and so forth). But thats not all, you have to take care about the fact that two users can request a print job at the same time. To serve this, you need a software which controls the printer.
CUPS is currently the most widely used spool system in Unix environments. Samba has built in support and defaults to CUPS if the develepment package (aka header files and librarys) could be found at compile time. The home of CUPS is []. Basically all sorts of files can be printed with CUPS, but using a Postscript printer driver will give you the most benefit and the client can controll the settings for the printers. A multi purpose printer driver for Windows can be found at the Adobe site, see []. The very big advantage of using Postscript as the printing language is that it doesn't matter wether your job has to be printed on a cheap inkjet or a big laser.
This is the first widely used printing system. It is very simple and doesnt use Postscript. But it is binary clean, so you can print to it directly via client side installed printer drivers.
Uploading a printer driver
Directory structure in drivers directory
The normal directory structure for your printer drivers looks like
drwxr-xr-x 2 root root 96 Feb 24 20:02 COLOR drwxr-xr-x 2 root root 48 Feb 24 20:02 IA64 drwxr-xr-x 2 root root 48 Feb 24 20:02 W32ALPHA drwxr-xr-x 2 root root 48 Feb 24 20:02 W32MIPS drwxr-xr-x 2 root root 48 Feb 24 20:02 W32PPC drwxr-xr-x 3 root root 72 Feb 24 20:02 W32X86 drwxr-xr-x 2 root root 48 Feb 24 20:02 WIN40 drwxr-xr-x 2 root root 48 Feb 24 20:02 x64
You have to create it yourself. Here is a command line which does it. You only have to change the value of BASEDIR:
BASEDIR=/var/lib/samba/drivers; for X in COLOR IA64 W32ALPHA W32MIPS W32PPC W32X86 WIN40 x64; do mkdir -p $BASEDIR/$X; done
Using printers connected to another Samba or Windows server
Using a printer connected to another Samba server
It is most likely that the other server is running CUPS to. So you only have to forward the print jobs to the other CUPS service. This is a simple to do in CUPS.
Using a printer connected to a Windows server
You also can use CUPS for it. CUPS has the special backend smb://<server>/<printer>. This in turn calls the smbspool program which is part of the samba suite. So if you set up a printer connected to a Windows server, you set up a normal printer with a special PrinterURI.
Note: the full form of that URI is: smb://[<username>[%<password>]@]//<server>/<printer>
--rcsu 15:34, 15 April 2006 (CDT)