Tom Crummey
2006-Oct-16 16:50 UTC
[Samba] Problem registering printer driver files with samba
Hello, Samba version 3.0.23c on Solaris 9. I can't seem to register printer driver files with samba using rpcclient. The problem is that NEWLINEs are not escaped, so I can't specify all the files I need to for a particular printer. Also, I can't use a Windows box with the add printer wizard as the printer insists on using it's own installer. In essence this is a bug, either in the Samba HOWTO (Chapter 21, section Running rpcclient with adddriver) or with rpcclient. The HOWTO example has an unbalanced ". It suggests that you can escape newlines using \, but when I do that, the filenames passed to samba include the newline and therefore, the command fails. Here is a snippet of log file that shows the problem: [2006/10/10 16:21:42, 3] lib/util.c:unix_clean_name(603) unix_clean_name [W32X86/3/ KMPF41IE.DLL] [2006/10/10 16:21:42, 3] smbd/dosmode.c:unix_mode(147) unix_mode(W32X86/3/ KMPF41IE.DLL) returning 0744 [2006/10/10 16:21:42, 3] lib/util.c:unix_clean_name(603) unix_clean_name [W32X86/ KMPF41IE.DLL] [2006/10/10 16:21:42, 0] printing/nt_printing.c:move_driver_to_download_area(1908) move_driver_to_download_area: Unable to rename [W32X86/ KMPF41IE.DLL] to [W32X86/3/ KMPF41IE.DLL] [2006/10/10 16:21:42, 3] smbd/sec_ctx.c:set_sec_ctx(241) setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1 [2006/10/10 16:21:42, 1] smbd/service.c:close_cnum(1141) spock (128.40.42.33) closed connection to service print$ [2006/10/10 16:21:42, 3] smbd/connection.c:yield_connection(69) Yielding connection to print$ I've tried it with no " with the second " before the first : and with the second " at the end of the command. No matter what I do, the newline is never escaped. If I try to run the command interactively, again, the newline is immediately interpreted as the end of the command and I cannot enter more than half of the driver filenames. I've tried 1-5 \ characters. Thinking that it could be a problem with the popt library in Solaris, I rebuilt samba with the builtin popt, but with no change. I've tried using rpcclient on a RedHat linux system (3.0.10), again that doesn't work. I'm stumped and could really do with some help. Has anyone managed to register a printer driver with so many files that it takes more than one command line length? -- Tom. -------------------------------------------------------------------------- Tom Crummey, Systems and Network Manager, EMAIL: tom@ee.ucl.ac.uk Department of Electronic and Electrical Engineering, University College London, TEL: +44 (0)20 7679 3898 Torrington Place, FAX: +44 (0)20 7388 9325 London, UK, WC1E 7JE. --------------------------------------------------------------------------