Steven Griffiths
2005-Mar-20 22:22 UTC
[Samba] rpcclient adddriver command results in 'WERR_BADFILE'
I wonder if someone could help me with this problem I am getting. I have been trying to get printer drivers installed onto my Samba server (v3.0.10 FC3) for a few days now and have finally hit this problem which I cannot fathom. I run this command to copy the drivers from w32x86 into the '3' directory: rpcclient -U'root' -c 'adddriver "Windows NT x86" \ printer:hpz2ku07.dll:hpop1207.dat:\ hpzntp07.dll:hpocahpr.hlp:NULL:RAW:\ hpzcin06.exe,hpzscr07.dll,hpzcfg07.exe,\ hpzcoi07.dll,hpzcon07.dll,hpzeng07.exe,\ hpzflt07.dll,hpzimc07.dll,hpzime07.dll,\ hpzjui07.dll,hpzlnt07.dll,hpzpcl07.dll,\ hpzpre07.exe,hpzr3207.dll,hpzres07.dll,\ hpzrp307.dll,hpzslk07.dll,hpzsnt07.dll,\ hpzstc07.exe,hpzstw07.exe,hpztbi07.dll,\ hpztbu07.exe,hpztbx07.exe,hpzvip07.dll,\ hpocabpr.hlp,hpocampr.hlp,hpocaspr.hlp,\ hpop1007.dat,hpop1107.dat,hpop2207.dat,\ hpop2107.dat,hpop2007.dat,hpopd907.dat,\ hpop4007.dat,hpop4107.dat,hpop6107.dat' gandalf typing the above command results in an error displayed on the console: result was WERR_BADFILE and the following details in the log: [2005/03/20 21:35:11, 1] smbd/service.c:make_connection_snum(648) gandalf (127.0.0.1) connect to service print$ initially as user root (uid=0, gid=0) (pid 8156) [2005/03/20 21:35:11, 1] smbd/service.c:close_cnum(836) gandalf (127.0.0.1) closed connection to service print$ [2005/03/20 22:05:36, 1] smbd/service.c:make_connection_snum(648) gandalf (127.0.0.1) connect to service print$ initially as user root (uid=0, gid=0) (pid 8283) [2005/03/20 22:05:36, 1] smbd/service.c:close_cnum(836) gandalf (127.0.0.1) closed connection to service print$ [2005/03/20 22:05:36, 1] smbd/service.c:make_connection_snum(648) gandalf (127.0.0.1) connect to service print$ initially as user root (uid=0, gid=0) (pid 8283) [2005/03/20 22:05:36, 0] printing/nt_printing.c:move_driver_to_download_area(1569) move_driver_to_download_area: Unable to rename [w32x86/ hpzntp07.dll] to [w32x86/3/ hpzntp07.dll] [2005/03/20 22:05:36, 1] smbd/service.c:close_cnum(836) gandalf (127.0.0.1) closed connection to service print$ Looking at the print directory it seems to have moved 2 of the files into the '3' directory and some of the other files have been deleted (originally there were 40 files in total): -rwxr--r-- 1 root root 226494 Dec 2 2002 hpocabpr.hlp -rwxr--r-- 1 root root 31676 Dec 2 2002 hpop1007.dat -rwxr--r-- 1 root root 55639 Dec 2 2002 hpop2107.dat -rwxr--r-- 1 root root 31693 Dec 2 2002 hpop4007.dat -rwxr--r-- 1 root root 46592 Nov 27 2002 hpzcin06.exe -rwxr--r-- 1 root root 208896 Nov 27 2002 hpzcoi07.dll -rwxr--r-- 1 root root 81920 Nov 27 2002 hpzflt07.dll -rwxr--r-- 1 root root 196608 Nov 27 2002 hpzjui07.dll -rwxr--r-- 1 root root 294912 Nov 27 2002 hpzntp07.dll -rwxr--r-- 1 root root 319488 Nov 27 2002 hpzpre07.exe -rwxr--r-- 1 root root 409600 Dec 2 2002 hpzrp307.dll -rwxr--r-- 1 root root 372736 Nov 27 2002 hpzstc07.exe -rwxr--r-- 1 root root 188416 Nov 27 2002 hpztbu07.exe 3: total 240 -rwxr--r-- 1 root root 38426 Dec 2 2002 hpop1207.dat -rwxr--r-- 1 root root 200704 Nov 27 2002 hpz2ku07.dll It's strange that some of the files have been deleted, but I have no idea why it chokes on one of these files and reports it as bad. I've tried recopying the files several times in case one of them is corrupted already. Thanks