Manual upload of printer drivers



#For the following steps two windows clients are needed - one x86 and one x64 - these example steps are using the concrete driver KyoClassicUniversalPCL5_v2.84 in each architecture.

####1. Create a dummy printer share (file-printer) at both windows client. The share is called KyoClassicUniversal in the following steps. Install the mentioned driver at both windows clients.

The following steps use as the x64 windows client and the commands are executed at the UCS printserver (here localhost).

####2. Query driver information on windows client:

# rpcclient -UAdministrator -c 'getdriver KyoClassicUniversal 3'
[Windows x64]Printer Driver Info 3:
			Version: [3]
			Driver Name: [Kyocera Classic Universaldriver]
			Architecture: [Windows x64]
			Driver Path: [\\\print$\x64\3\UNIDRV.DLL]
			Datafile: [\\\print$\x64\3\KyUniL.GPD]
			Configfile: [\\\print$\x64\3\UNIDRVUI.DLL]
			Helpfile: [\\\print$\x64\3\UNIDRV.HLP]
			Dependentfiles: [\\\print$\x64\3\KyUFon.dll]
			Dependentfiles: [\\\print$\x64\3\KyURes.dll]
			Dependentfiles: [\\\print$\x64\3\KyUniP.INI]
			Dependentfiles: [\\\print$\x64\3\KyUniQ.XML]
			Dependentfiles: [\\\print$\x64\3\KyUniQ.gdl]
			Dependentfiles: [\\\print$\x64\3\KyUSNM.exe
			[...some more dependedfiles...]
			Monitorname: [PJL Language Monitor]
			Defaultdatatype: [(null)]

3. Download of the drivers:

# smbclient -UAdministrator //\$ -c "recurse;prompt;mget x64"

This command will copy the whole x64 folder of the windows client. It would be, of course, possible to only copy the specified files above by directly targeting them.

####4. Each of the files of the rpcclient getdriver output has to be put to the fileserver. It is very important that each files is transferred correctly. It is possible that some files are written with uppercase names - these files has to be renamed. Known examples are “UNIDRVUI.DLL” and “UNIDRV.HLP”.

# smbclient -UAdministrator //localhost/print\$ -c 'cd x64';
put KyUniL.GPD;
put unidrvui.dll UNIDRVUI.DLL;
put unidrv.hlp UNIDRV.HLP;
put KyUFon.dll;
[... and so on...]

These driver files should now be placed underneath /var/lib/samba/drivers/x64/ (not …/x64/3!).

####5. Add drivers to printserver:

The driver now has to be made available to the printserver. For this, we also use rpcclient - but now with adddriver.
The command has to be filled with the parameters architecture, configuration and version.

configration is line, filled with colon separated fields. An empty field has to be filled with “NULL”. The names of these fields reflect the getdriver output from point 2:

Long Printer Name:
Driver File Name:
Data File Name:
Config File Name:
Help File Name:
Language Monitor Name:
Default Data Type:
Comma Separated list of dependent Files

version means the Printer Driver Version - for alle windows clients since 2000 this has to be 3.

The name of the driver is immarterial - but it has to be equal on x86 and x64:

 # rpcclient -UAdministrator localhost -c 'adddriver "Windows x64" "KyoClassicUniversalPrinterName:UNIDRV.DLL:KyUniL.GPD:UNIDRVUI.DLL:UNIDRV.HLP:PJL Language Monitor:NULL:KyUFon.dll,KyURes.dll,KyUniP.INI,KyUniQ.XML,[...],STDSCHMX.GDL,TTFSUB.GPD" "3"' 

The result should be “Printer Driver KyoClassicUniversalPrinterName successfully installed.
With rpcclient enumdrivers the uploaded drivers can now be checked:

 # rpcclient -UAdministrator localhost -c 'enumdrivers 8'

How to Printer Server UCS or Windows
LDAP or Active Directory association