[Samba] rpcclient errors

Jeffrey Bernhard jeffrey.bernhard at gmail.com
Wed Sep 22 08:32:25 MDT 2010

I'm running Ubuntu 10.04 LTS and loaded (via apt-get) Samba version 2:3.4.7
as part of the effort to bring up Sambafax. A dpkg-query gives the

# dpkg-query -l  | fgrep samba
ii  libcrypt-smbhash-perl               0.12-3
generate LM/NT hash of a password for samba
ii  samba                               2:3.4.7~dfsg-1ubuntu3.1
SMB/CIFS file, print, and login server for U
ii  samba-common                        2:3.4.7~dfsg-1ubuntu3.1
common files used by both the Samba server a
ii  samba-common-bin                    2:3.4.7~dfsg-1ubuntu3.1
common files used by both the Samba server a
ii  samba-doc                           2:3.4.7~dfsg-1ubuntu3.1
Samba documentation

The Windows drivers I've chosen are those used in a previous implementation
of Sambafax (now years old) running on an old Redhat kernel; I'm to 'update'
this but decided to use the Windows drivers of the old implementation with
the notion, "if it ain't broke"...

Populating /etc/samba/drivers with W32X86/2 and  WIN40/0 drivers, I see:

# ls -R /etc/samba/drivers
W32X86  WIN40


cups5.hlp  cupsdrv5.dll  cupsui5.dll  sambafax.ppd



I've tried to run rpcclient with the "adddriver" subcommand which fails with
an different error for these 2 cases, and nothing specific in the error
messages to indicate what really is the problem:

# rpcclient -U 'Name%passwd' -c 'adddriver "Windows NT x86"
result was WERR_BADFILE


# rpcclient -U 'Name%passwd' -c 'adddriver "Windows 4.0"

I've tried putting the driver files directly in /etc/samba/drivers prior to
executing the above rpcclient commands, as some comments on the net suggest
the 'adddriver' command expects them there and moves them to the appropriate
subdirectories but similar errors ensue.

My thought is to have the source for rpcclient and instrument it to
determine just what is being attempted by rpcclient at the time an error is
raised. I've been stuck on this a few days...

Any suggestions? Where can I obtain the source for the rpcclient command
(that would match the version of Samba I'm attempting to use)?

Sorry for the volume here, but I didn't want to leave out some useful detail
or other.

Jeff Bernhard

More information about the samba mailing list