[Samba] Having issues with rpcclient's adddriver

Kurt Pfeifle kpfeifle at danka.de
Fri May 21 15:05:28 GMT 2004

> Tim Kent tim.kent at wkconsulting.com.au
> Tue May 18 01:09:20 GMT 2004
> Hi,
> I'm trying to add a Windows NT/2000 OKI C5100 print driver to a Samba 
> 2.2.3a server. 

Can't you try to use a more current Samba version?

(The most current versions have support for the "version" tag of
printer drivers...)

> I've been told that this driver does some server-side 
> stuff, so I'll have to use 'adddriver' in rpcclient.
> I've read the manual page for rpcclient, and I printed out a 'Windows 
> 2000 Printer Test Page' to get all the relevant information.
> This is probably just something simple, but I've checked this out a 
> couple of times and keep getting a syntax error.  Do I have too many 
> files listed, and if so do I need all of these listed files?
> tim at test:~$ rpcclient test -U root
> INFO: Debug class all level = 2   (pid 9287 from pid 9287)
> Enter Password:
> session setup ok
> Domain=[TEST] OS=[Unix] Server=[Samba 2.2.3a-13 for Debian]
> rpcclient $> adddriver "Windows NT x86" "OKI 
> OKI HiperC Language Monitor:RAW:ABEXPW32.DLL,CANLKN.PRF,CNNbapie.DLL,\
> Usage: adddriver <Environment>\
>          <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 Files>
> I know that looks like a very long list, but that's what the 'Windows 
> 2000 Printer Test Page' told me!  I'm assuming that most of those files 
> are related to some kind of monitor that I could perhaps do without.

The "adddriver" subcommand expects (for Windows NT/2000) to find
all the files in the "[print$]/W32X86/" subdirectory. It then
moves the files into "[print$]/W32X86/2/" and creates the fake
"registry" entries (in the *.tdb files) for the driver.

If your "adddriver" command fails once (for one reason or another,
like mistyping anything), you can't repeat it without makeing sure
that all initial files are still in "[print$]/W32X86/". Your failed
first adddriver command may have moved away all or part of the files.
Your second attempt at the adddriver command now will fail because
it doesn't find the files you reference.

Lastly, I'd recommend to run the command "all in one":

  rpcclient -Uroot%passwd -c 'adddriver "Windows NT x86" "OKI....:yada:..."' sambahostname

> As far as my syntax is concerned I have the files in the right order.

It looks like your syntax is OK. But I remember having had problems
with 2.2.3a and adddriver. If nothing else works, an upgrade to
3.0.4 should help....

> Cheers,
> Tim


More information about the samba mailing list