Setting up Samba as a Print Server
- 1 Overview
- 2 Printserver software / Using printers connected to the Samba server
- 3 Providing Printer Drivers to Windows clients with the [print$] share
- 4 Formular / Special settings on printer and faxes
Samba could no only act in the fileserver role. There is also the possibility to do the job as printserver for the windows clients.
This seems to be well known, and nobody needs to any instruction because it is working :-)
When we take a closer lool to this role, it consists out of the following parts:
- printer share -> at the printingprocess the client copies the spoolfiles
- printserver software -> cups, lprng, lpr or something else. He delivers the spoolfiles to the printing devices. Maybe over the network or localy
- windows printer driver -> to use the 'point and print' functionality it makes sence to store the windows printer driver in a special share (print$) on the server. Inside of this driver also the default settings of the printer are stored.
- printer formular -> Every windows printout depends on the formular with his papersizes and so on. If a formular isn't know to the printserver the client could not use this although the printer was able to do it. Think about large formular or special paper like photos.
- something I have forgotten ...
Printserver software / 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 libraries) 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 control 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 whether your job has to be printed on a cheap inkjet or a big laser.
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>]@][domain/]<server>/<printer>
--rcsu 15:34, 15 April 2006 (CDT)
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.
to do a upload of the windows printer driver there must be done some steps.
- We need a user which is permited to do the job -> a printer admin windows call it 'Printer Operator'
- a share have to be prepaired an the printer admin need permission to read and write.
how to configure printer admin
since samba 3.0.20 the parameter is depricated and in the actuall version it isn't working anymore.
so what is the commandline to get a printer admin?
do the following command and the user or group will be printer admin:
net rpc rights grant "<domain|hostname\<user|group>" SePrintOperatorPrivilege -U <hostname>/root
net rpc rights grant "cake\support" SePrintOperatorPrivilege -U cake/root
this mean the user support on machine is printeradmin by the user root on the hostname "cake"
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
Please have a look at the smb.conf and change only the necessary lines (user,groups), most of the distributions are well prepaired.
[print$] comment = Printer Drivers path = /var/lib/samba/drivers browseable = yes guest ok = no read only = yes write list = root, chrisr
Uploading a printer driver (vendor drivers)
Do it like:
Configuring point and print driver sharing in mixed 32/64 bit Windows client environments requires a differing procedure to the regular (32 bit only) add printer wizard usage:
- The 64bit driver must be uploaded using the "\\server\printers\ -> server properties" wizard. This wizard allows the uploading of printer drivers that differ in architecture to what is reported by the spoolss server (configurable in 3.6.3).
- A 32 bit driver with an identical name must also be uploaded to the server and associated with the printer, the regular add printer wizard can be used for this.
Formular / Special settings on printer and faxes
Enabling new papersizes
Only standardsizes of formulars are known. You have to add the neccessary sizes by hand.
- connect to the server \\<SambaServer>>
- printer -> Server Propertes -> Forms
- Create new form
- After this steps the large papersizes a shown in the different dialogs
The Size of the formulars depends on the ppds