[Samba] rpcclient adddriver WERR_BADFILE

Chris cjl at viptalk.net
Tue Feb 12 16:50:59 GMT 2008


I'm not having any luck using the rpcclient adddriver functions to  
install windows point-and-print drivers into print$.

The add printer wizard fails after copying the files to \\SERVERX\print 
$\W32X86 so I am trying to install using rpcclient to see if it tells  
me anything more.

I'm using the cups v6 drivers to test with.  I get the same thing  
trying my HP Laserjet 2100 drivers.

rpcclient -d 4 -U cjl -c 'adddriver "Windows NT x86" \
"CUPS Test Driver v6:\
pscript5.dll:\
cups6.ppd:\
ps5ui.dll:\
pscript.hlp:\
NULL:\
RAW:\
pscript.ntf,cups6.ini,cupsps6.dll,cupsui6.dll" 3' SERVERX

the debug output ends with:

rpc_pipe_bind: Remote machine SERVERX pipe \lsarpc fnum 0x7108 bind  
request returned ok.
lsa_io_sec_qos: length c does not match size 8
rpc_pipe_bind: Remote machine SERVERX pipe \spoolss fnum 0x7109 bind  
request returned ok.
result was WERR_BADFILE

cjl has full administrator privileges and has no trouble manipulating  
the print$ share.  It doesn't look like a permissions problem to me,  
unless it's some specific printer admin issue.  It looks like there  
have been some changes regarding "printer admin" being deprecated.

This is on Mac OS X Server 10.5.1.  Edit: Just upgraded...  Same on  
10.5.2. Version 3.0.25b-apple

[print$]
         path = /Shares/PrintDrivers
         browseable = no
         write list = @admin
         oplocks = yes
         strict locking = no



More information about the samba mailing list