Hi Matt, the problem you referred to is discussed in detail as bug #82 in Samba's bug tracking tool. It consists of 2 bugs. One prevents the registration of drivers and is due to a NULL-pointer passed from that part of code in rpc_server/srv_spoolss_nt.c which calls sys_adminlog function. It begins with the comment /* BEGIN_ADMIN_LOG */ and ends with the comment /* END_ADMIN_LOG */ The comments surround the code which should log that a printer driver has been added, listing driver's name, its OS, and admin's name. Since this sys-admin-logging is non-essential for the operation of Samba and CUPS you may simply extend the comment to include the whole code in between the two comments by removing the first "*/" and the second "/*" like this: /* BEGIN_ADMIN_LOG ......... code here commented out ............ END_ADMIN_LOG */ Samba built with this change will not report NT_STATUS_UNSUCCESSFUL when you execute "adddriver" subcommand of rpcclient. The other bug prevents rpcclient's "enumdrivers" subcommands from completing and can be fixed by changing the line #943 in lib/util_unistr.c so that it reads: src_len = ( src == NULL ? 0 : strlen_w(src)*2+2 ); instead of just src_len = strlen_w(src)*2+2; So that you may find that part easily, here are the 7 lines surrounding and including the offending line: 940 dest_len=MAXUNI-3; 941 942 if (flags & STR_TERMINATE) 943 src_len = strlen_w(src)*2+2; 944 945 dest_len = MIN((src_len/2), (dest_len-1)); 946 unistr_to_ascii(dest, src, dest_len); Another problem is building a fixed version of Samba. Somehow, the Linux vendors refrain from disclosing in full detail the files necessary for the build. They all more or less build their packages with "rpm -bb" which requires a ".spec" file. This is a kind of script listing all the dependencies, prerequisites, and steps to be taken in order to build an RPM fully automatically. Some of these steps consist of patching different original Samba files to either fix defects discovered after a major release came out or that are known to occur only in a specific distro, in other words to make it adhere to some specifics of a vendor's distro. The patch files are the correct place to register such changes to the source code as I mentioned above. However, vendors just mirror the latest samba source and let YOU figure out what is needed to be done in order for the software to build and run. In my view this is in clear contravention of the GPL!!! The vendors are selling the work of others omitting the essential information which makes it tick on their particular distro. This is a SERIOUS PROBLEM which has to be raised, unless of course it is just my inability to locate those informations on the web. In my case, SuSE 8.2, the vendor did a thorough job of providing almost all of the pre-requisite files on their sites. The missing ones were a few documents and a couple of template Samba configuration files which were already in their original 2.2.8a offering. It wasn't difficult to just copy those files into the /usr/src/packages/SOURCES with the rest. But try that with RedHat! I would really like to know which other vendors provide their customer with such informations in full detail. What is missing even in SuSE's documentation is a list of all the devel packages which need to be installed on a system in order to be able to build samba. I mean, I ran myself into the problem that configure failed and stopped the build when it tried to verify if it can use the included popt lib. It couldn't compile the test case because I didn't have "openldap2-deve-l2.1.12-44" installed. My guess is that you probably need the following: cups-devel-1.1.18-56 libacl-devel-2.2.6-8 libattr-devel-2.4.0-14 libsmbclient-devel-2.2.8a-3 openldap2-devel-2.1.12-44 openssl-devel-0.9.6i-12 pam-devel-0.77-38 popt-devel-1.6.4-31 but I'm not sure because I've installed all devel packages (130 of them) just in case. I would be much obliged if someone could correct this list, if something is missing or superfluous. Matt, I hope this information helps anyone confronted with this bug in 2.2.8a. If you happen to have SuSE 8.2 on your system, I might send you a tarball with .spec and related files for the build. I guess that the same files would also work for RedHat and other distros but then again I might be wrong. Cheers Dragan ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
>> Samba built with this change will not report >> NT_STATUS_UNSUCCESSFUL when you execute "adddriver" >> subcommand of rpcclient. > >I found reference to this in one of your posts and in >Samba's bugzilla database. I've tried commenting out >this code, rebuilding, installing, etc. but I still >get the error.Unfortunately, many conditions can lead to the same symptoms. Omitting a mandatory field in the third parameter, mixing files from different levels, versions and OS's, improper path permissions, etc. You should increase the logging level drastically, e.g. "smbcontrol smbd debug 999" execute the command, reduce the logging level and pore over the logs.>> The other bug prevents rpcclient's "enumdrivers" >> subcommands from completing and can be fixed by..................>This fix is in the CVS version I checked out. Their >fix is slightly different, but I can see it does the >same thing.>> Another problem is building a fixed version of >> Samba. Somehow, the Linux vendors refrain from..........................>I'm running on Slackware, so there's a Slackbuild >script in the source tree that explains how Samba was >built. At the moment I'm just doing a standard >./configure build as I just want to see if this >printing will work smoothly. > >As of the current CVS checkout I made yesterday, and >trying your commenting-out fix, I still get the >errors.Might it be, that your edits get somehow ignored by the build script? Dumb question, perhaps. ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
Hi again, I'm still trying to set my Samba box up to allow the Adobe PS drivers to be automatically downloaded. Thanks to a couple of replies, I've tried three courses of action, none of which have been successful. These are: 1) Fix for source/lib/util_unistr.c (bugid #82) 2) Comment out the lines in source/rpc_server/srv_spoolss_nt.c enclosed between /* BEGIN_ADMIN_LOG */ and /* END_ADMIN_LOG */ 3) Use the rpcclient binary from a 3.0 source build Using the first two, I still get a NT_STATUS_UNSUCCESSFUL using the "rpcclient adddriver". Using the rpcclient binary from a 3.0 source build, (alpha24), I instead get a WERR_BADFILE for the same command. Here's running "cupsaddsmb -v" with fixes 1) & 2): # /usr/sbin/cupsaddsmb -v -U root oki7200 Password for root required to access localhost via SAMBA: Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir W32X86;put /var/spool/cups/tmp/3edb1698e3fc0 W32X86/oki7200.PPD;put /usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP' added interface ip=192.168.50.129 bcast=192.168.50.255 nmask=255.255.255.128 added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0 Domain=[XREFER] OS=[Unix] Server=[Samba 2.2.9pre1] NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86 putting file /var/spool/cups/tmp/3edb1698e3fc0 as \W32X86/oki7200.PPD (16523.1 kb/s) (average 16523.4 kb/s) putting file /usr/share/cups/drivers/ADOBEPS5.DLL as \W32X86/ADOBEPS5.DLL (22343.6 kb/s) (average 21179.7 kb/s) putting file /usr/share/cups/drivers/ADOBEPSU.DLL as \W32X86/ADOBEPSU.DLL (22083.0 kb/s) (average 21354.6 kb/s) putting file /usr/share/cups/drivers/ADOBEPSU.HLP as \W32X86/ADOBEPSU.HLP (18016.8 kb/s) (average 21250.3 kb/s) Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows NT x86" "oki7200:ADOBEPS5.DLL:oki7200.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"' cmd = adddriver "Windows NT x86" "oki7200:ADOBEPS5.DLL:oki7200.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL" result was NT_STATUS_UNSUCCESSFUL Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir WIN40;put /var/spool/cups/tmp/3edb1698e3fc0 WIN40/oki7200.PPD;put /usr/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM;put /usr/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV;put /usr/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP;put /usr/share/cups/drivers/DEFPRTR2.PPD WIN40/DEFPRTR2.PPD;put /usr/share/cups/drivers/ICONLIB.DLL WIN40/ICONLIB.DLL;put /usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;' added interface ip=192.168.50.129 bcast=192.168.50.255 nmask=255.255.255.128 added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0 Domain=[XREFER] OS=[Unix] Server=[Samba 2.2.9pre1] NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40 putting file /var/spool/cups/tmp/3edb1698e3fc0 as \WIN40/oki7200.PPD (20653.8 kb/s) (average 20654.3 kb/s) putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM (22483.2 kb/s) (average 22231.0 kb/s) putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV (23008.5 kb/s) (average 22740.1 kb/s) putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP (21317.0 kb/s) (average 22602.4 kb/s) putting file /usr/share/cups/drivers/DEFPRTR2.PPD as \WIN40/DEFPRTR2.PPD (13174.5 kb/s) (average 22502.1 kb/s) putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL (23071.4 kb/s) (average 22530.9 kb/s) putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL (18666.1 kb/s) (average 22417.3 kb/s) Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows 4.0" "oki7200:ADOBEPS4.DRV:oki7200.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,oki7200.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"' cmd = adddriver "Windows 4.0" "oki7200:ADOBEPS4.DRV:oki7200.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,oki7200.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL" result was NT_STATUS_UNSUCCESSFUL Running command: rpcclient localhost -N -U'root%secret' -c 'setdriver oki7200 oki7200' cmd = setdriver oki7200 oki7200 Succesfully set oki7200 to driver oki7200. Here's running "cupsaddsmb -v" with fixes 1), 2), & 3) (the 3.0 rpcclient): # /usr/sbin/cupsaddsmb -v -U root oki7200 Password for root required to access localhost via SAMBA: Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir W32X86;put /var/spool/cups/tmp/3edb1611677d2 W32X86/oki7200.PPD;put /usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP' added interface ip=192.168.50.129 bcast=192.168.50.255 nmask=255.255.255.128 added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0 Domain=[XREFER] OS=[Unix] Server=[Samba 2.2.9pre1] NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86 putting file /var/spool/cups/tmp/3edb1611677d2 as \W32X86/oki7200.PPD (16523.1 kb/s) (average 16523.4 kb/s) putting file /usr/share/cups/drivers/ADOBEPS5.DLL as \W32X86/ADOBEPS5.DLL (22343.6 kb/s) (average 21179.7 kb/s) putting file /usr/share/cups/drivers/ADOBEPSU.DLL as \W32X86/ADOBEPSU.DLL (22083.0 kb/s) (average 21354.6 kb/s) putting file /usr/share/cups/drivers/ADOBEPSU.HLP as \W32X86/ADOBEPSU.HLP (18016.8 kb/s) (average 21250.3 kb/s) Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows NT x86" "oki7200:ADOBEPS5.DLL:oki7200.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"' Error loading module '/usr/local/samba/lib/charset/CP850.so': /usr/local/samba/lib/charset/CP850.so: cannot open shared object file: No such file or directory Conversion from UCS-2LE to CP850 not supported ---8<--- Error loading module '/usr/local/samba/lib/charset/CP850.so': /usr/local/samba/lib/charset/CP850.so: cannot open shared object file: No such file or directory Conversion from UTF8 to CP850 not supported added interface ip=192.168.50.129 bcast=192.168.50.255 nmask=255.255.255.128 added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0 Connecting to host=localhost share=IPC$ Connecting to 127.0.0.1 at port 445 error connecting to 127.0.0.1:445 (Connection refused) Connecting to 127.0.0.1 at port 139 lsa_io_sec_qos: length c does not match size 8 result was WERR_BADFILE (It then loops asking for the password again) Anyone have a suggestion as to what to try next? Cheers Matt
>I'm still trying to set my Samba box up to allow the >Adobe PS drivers to be automatically downloaded. > >Thanks to a couple of replies, I've tried three >courses of action, none of which have been >successful. These are:Your problem is trivial, Matt, but you're not doing the right thing to find out how trivial it is. By opting "-v" in your "cupsaddsmb" call in you are seeing only the client's point of view on the problem. There is much more going on on the server side, which rpcclient cannot show because its crystal ball is as usual dusted over and it doesn't get much of diagnostic from the rpc_server, just go/no-go. Do yourself a favour and proceed as follows: 0. insert the option "debug timestamps = Yes" in your smb.conf and let it take effect. "smb restart" or psj smbd | \ while read pid pid rest; do kill -HUP $pid; done would do. 1. cd to the samba log dir and clean up your host's (WINS name for localhost) file, e.g. cd /var/log/samba > yourhost.log 2. increase debugging level liberally, e.g. smbcontrol smbd debug 9999 3. do your cupsaddsmb -v -U root oki7200 4. reduce debugging level to normal smbcontrol smbd debug 1 5. try to make sense of so much static noise in "yourhost.log". If you need help, gzip and mail the file to someone (I volunteer). Cheers Dragan ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
>> Your problem is trivial, Matt, but you're not doing..........................>:-) > >I eventually found the problem. Another admin had >helpfully changed the "share = " setting from user >to share for some reason which I'm currently trying >to extract out of him. Changing it back to user and >everything works okay with just your bugfixes (or >equivalent).I guess you mean changed "security = user" to "security = share". Duh! Short of peeking in "smb.conf" you can infer that kind of error only with server logs :-) Glad you found the bugger, erm, the bug. ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005