Hi, I am working on an old Unix system, UNIX SVR4 MP-RAS, running a Teradata database. Due to the age of the system (notably the C compiler, which won't handle v3 source code), I have built Samba 2.2.12 I want to use this to share Unix directories out to XP clients as network drives, for read-write access, keeping the file ownership as strict unix users. This all works fine, except for one thing; the passwords sent from XP don't get cleared by the password routines. Currently I have hacked the code to allow any password, and mitigated this by restricting the share to specific users & specific IP addresses. The file shares work perfectly apart from this, so I know the password matching bit is the only thing that's not working.>From reading samba pages, there appears to be several different LAN manager type encryptions.1. The original Windows LAN Manager 2. NT LAN Manager (NTLMv1) 3. NTLMv2>From looking at the password code, I think Samba v2 supports options 1 & 2, but not NTLMv2. Is this correct?What does XP send? Is it NTLMv2? Where can I find a chunk of code that I can add into the smbd password library to get this to work for me? Or is there an easier way? I'm an experienced programmer, but don't have much networking knowledge - should I be trying to use some sort of link to our Active Directory server (does winbind do this?) Smb.conf listed here: [global] workgroup = EDW netbios name = EDWDEV lock directory = /usr/local/samba/var/locks # Edit this file to assing mappings between Windows & Unix users. username map = /usr/local/samba/lib/usermap.txt # XP uses encrypted passwords by default. let's set this up. security = user encrypt passwords = yes smb passwd file = /usr/local/samba/private/smbpasswd preserve case = yes [DEV] Comment = Dev software directory guest ok = no read only = no path = /home1/DEP create mode = 0775 # restrict to listed users. no-one else can connect. valid users = laiptc2, laiptc3, laiptc5, laiptc6, laiptc7 # restrict to listed PCs. hosts allow = 25.167.169.200, 25.167.167.174, 25.167.167.193, 25.167.172.207, 25.167.169.178, 25.167.170.9 Phil Horder Teradata Developer
On Fri, Jul 04, 2008 at 09:54:02AM +0100, PhilH wrote:> I am working on an old Unix system, UNIX SVR4 MP-RAS, running a Teradata database. > Due to the age of the system (notably the C compiler, > which won't handle v3 source code), I have built Samba > 2.2.12Isn't gcc available for your system? Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20080704/c3c14b09/attachment.bin
>Isn't gcc available for your system?No, I'm 99% sure there isn't a gcc on MP-RAS. I've looked at building gcc as well, but then run into more problems with that; config.guess fails trying to run a utility that doesn't exist. Can you point me at the code in Samba 3 that does the ntlmv2 encryption? Maybe I can patch this into the v2 code? Any other suggestions? Phil
On Mon, Jul 07, 2008 at 10:01:09AM +0100, PhilH wrote:> Can you point me at the code in Samba 3 that does the ntlmv2 > encryption? Maybe I can patch this into the v2 code?In 3.2 most of the cryto routines are in the files libsmb/ntlmssp.c and libsmb/smbencrypt.c. What is it that your compiler breaks over? Maybe it might be easier to fix those for your environment that pushing modern crypto into 2.2. For example the named initializers should quite easily be revertable for you. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20080707/3d68b6d5/attachment.bin
Hi, I've gone back to trying to build 3.0. Initially, the configure failed, not being able to guess the system config. I tried it with i586-ncr-sysv4.3, and it seemed to accept this (I found this option looking at the gcc configure) The next configure problem was that it didn't find the cc compiler; I fixed this by defining CC=cc After that, it couldn't find an acceptable grep; I simply commented out the exit at this point It then found egrep, and continued the configure, listed below. It seems to not be finding several utilities I know we have, including awk & nawk, and these can be found using our standard PATH. It then fails the c compiler with: c99 structure initializer are not supported Any suggestions on; 1. getting configure to find grep, awk, nawk, etc. 2. how to get this to build without the initializer option. philh (different email address now) Configure output; SAMBA VERSION: 3.0.28a LIBREPLACE_LOCATION_CHECKS: START checking build system type... i586-ncr-sysv4.3.03 checking host system type... i586-ncr-sysv4.3.03 checking target system type... i586-ncr-sysv4.3.03 LIBREPLACE_LOCATION_CHECKS: END LIBREPLACE_CC_CHECKS: START checking for gcc... cc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... no checking whether cc accepts -g... yes checking for cc option to accept ISO C89... -Xc -D__EXTENSIONS__ checking for cc -Xc -D__EXTENSIONS__ option to accept ISO C99... unsupported checking how to run the C preprocessor... cc -Xc -D__EXTENSIONS__ -E grep? checking for grep that handles long lines and -e... grep2? grep3? grep4? configure: error: no acceptable grep could be found in .:/home1/DEP/phil/bin:/home1/DEP/phil/exe:/usr/bin:/usr/sbin:/usr/ccs/bin;/usr/xpg4/bin checking for egrep... egrep checking for AIX... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... no checking for stdint.h... no checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking whether byte ordering is bigendian... no checking for inline... no checking for C99 designated initializers... no checking for C99 designated initializers with -AC99... no checking for C99 designated initializers with -qlanglvl=extc99... no checking for C99 designated initializers with -qlanglvl=stdc99... no checking for C99 designated initializers with -c99... no configure: WARNING: c99 structure initializer are not supported checking for a BSD-compatible install... ./install-sh -c checking for library containing strerror... none required checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... unknown checking for _LARGE_FILES value needed for large files... unknown checking standards.h usability... no checking standards.h presence... no checking for standards.h... no checking for long long... yes checking for uint_t... yes checking for int8_t... no checking for uint8_t... no checking for int16_t... no checking for uint16_t... no checking for int32_t... no checking for uint32_t... no checking for int64_t... no checking for uint64_t... no checking for size_t... yes checking for ssize_t... yes checking for int... yes checking size of int... 4 checking for char... yes checking size of char... 1 checking for short... yes checking size of short... 2 checking for long... yes checking size of long... 4 checking for long long... (cached) yes checking size of long long... 8 checking for off_t... yes checking size of off_t... 4 checking for size_t... (cached) yes checking size of size_t... 4 checking for ssize_t... (cached) yes checking size of ssize_t... 4 checking for intptr_t... no checking for ptrdiff_t... yes checking for immediate structures... no LIBREPLACE_CC_CHECKS: END checking whether to use profiling... no checking for a BSD-compatible install... ./install-sh -c checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... no checking for perl... no checking for ar... no checking if the linker (ld) is GNU ld... no checking whether cc -Xc -D__EXTENSIONS__ and cc understand -c and -o together... yes checking that the C compiler understands -Werror... no checking that the C compiler understands -w2... yes checking that the C compiler understands volatile... yes checking that the C compiler understands negative enum values... yes checking for C99 designated initializers... no checking for C99 designated initializers with -AC99... no checking for C99 designated initializers with -qlanglvl=extc99... no checking for C99 designated initializers with -qlanglvl=stdc99... no checking for C99 designated initializers with -c99... no configure: error: c99 structure initializer are not supported Phil Horder Teradata Developer philip.horder@teradata.com 0771 765 2467 01935 452646 The most important computer is the one that rages in our skulls and ever seeks that satisfactory external emulator. - Alan J. Perlis. The information in this email is confidential and may be legally privileged. If you are not the intended recipient, any disclosure, copying, distribution, or any other act or omission in reliance on it, is prohibited and may be unlawful, and you should notify the sender immediately by return e-mail to the address where the e-mail originated. Any opinions, advice or statements contained in this email are subject to formal contract. Nothing contained in this email is capable of becoming legally binding upon Teradata, unless specifically stated so in this e-mail by Teradata. Teradata (UK) Limited is registered in England with company number 06239196. Registered office address is 206 Marylebone Road, London NW1 6LY.
>> It then fails the c compiler with: >> c99 structure initializer are not supported > >Ok. We make use of those for example at the bottom of >librpc/gen_ndr/ndr_wkssvc.c. It is pretty straightforward to >convert those to non-named initializers and remove the >configure check. If that is the only thing your compiler can >not do, this is boring but definitely easier than getting >2.2 up to speed with current Windows versions.Ok, I'll start compiling, and see what falls over.>> Any suggestions on; >> 1. getting configure to find grep, awk, nawk, etc. > >I'm not aware that we actually depend on those.Needed to patch Makefile to set "AWK=nawk">If you have autotools around, you might want to comment out...No such luck. So I went for it. The following is the result. As you can see it didn't get very far, and I don't understand why. For some reason, Make complains that I haven't run configure, and also complains about "hostname: not found". Then it completely dies trying to compile dynconfig.h. I've looked at most of these errors & warnings, and can't find a single thing wrong with the source code at the lines mentioned. It looks like there is still some configuration stuff missing, but I don't know what. Here's the compiler output. Any suggestions, 'cos this is looking pretty hopeless to me, as I haven't even got to the c99 initialiser errors yet?! phil. ------------------------------------------------------------------------ --------------------------------------------------------------------- 4980-laiptc6:/home/laiptc6/samba-3.0.28a/source>make Using FLAGS = -O -D_SAMBA_BUILD_=3 -I/home/laiptc6/samba-3.0.28a/source/popt -I/home/laiptc6/samba-3.0.28a/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -I/home/laiptc6/samba-3.0.28a/source/lib -D_SAMBA_BUILD_=3 PICFLAG = -fPIE LIBS = -lresolv -lnsl LDFLAGS = -pie DYNEXP = LDSHFLAGS = shared-libraries-disabled SHLIBEXT = shared_libraries_disabled SONAMEFLAG = shared-libraries-disabled Building include/proto.h creating /home/laiptc6/samba-3.0.28a/source/include/proto.h Building include/build_env.h UX:sh (build_env.sh): ERROR: hostname: not found creating /home/laiptc6/samba-3.0.28a/source/nsswitch/winbindd_proto.h creating /home/laiptc6/samba-3.0.28a/source/web/swat_proto.h creating /home/laiptc6/samba-3.0.28a/source/client/client_proto.h creating /home/laiptc6/samba-3.0.28a/source/utils/net_proto.h creating /home/laiptc6/samba-3.0.28a/source/utils/ntlm_auth_proto.h WARNING: you need to run ./configure WARNING: you need to run ./config.status Compiling dynconfig.c NCR High Performance C Compiler R3.0c (c) Copyright 1994-98, NCR Corporation (c) Copyright 1987-98, MetaWare Incorporated E "/usr/include/arpa/inet.h",L66/C19(#164): in_addr_t | Symbol declaration is inconsistent with a previous declaration | at "/usr/include/netinet/in.h",L40/C27. E "/usr/include/arpa/inet.h",L67/C19(#164): in_port_t | Symbol declaration is inconsistent with a previous declaration | at "/usr/include/netinet/in.h",L39/C28. E "/usr/include/arpa/inet.h",L68/C1(#164): in_addr_t | Symbol declaration is inconsistent with a previous declaration | at "/usr/include/netinet/in.h",L40/C27. E "/usr/include/arpa/inet.h",L69/C1(#164): in_port_t | Symbol declaration is inconsistent with a previous declaration | at "/usr/include/netinet/in.h",L39/C28. w "/usr/include/sys/bitypes.h",L82/C1(#31): Identifier missing in declaration. E "/usr/include/sys/bitypes.h",L87/C16(#95): short: short is superfluous here. w "/usr/include/sys/bitypes.h",L87/C1(#31): Identifier missing in declaration. E "/usr/include/sys/bitypes.h",L88/C15: (syntactic) unexpected symbol:'char' REPAIR: ';' was inserted before 'char'@"/usr/include/sys/bitypes.h",L88/C15 <mailto:'char'@> E "/usr/include/rpc/auth.h",L80/C11: (syntactic) unexpected symbol:'<IDENTIFIER>':high REPAIR: No_specifiers@"/usr/include/rpc/auth.h",L80/C3 <mailto:No_specifiers@> through ';'@"/usr/include/rpc/auth.h",L80/C15 was replaced with '#pragma' w (#657): (info) How referenced files were included: | File /usr/include/netinet/in.h from ./lib/replace/system/network.h from include/includes.h from /home/laiptc6/samba-3.0.28a/source/dynconfig.c. | File /usr/include/arpa/inet.h from ./lib/replace/system/network.h from include/includes.h from /home/laiptc6/samba-3.0.28a/source/dynconfig.c. | File /usr/include/sys/bitypes.h from /usr/include/netdb.h from ./lib/replace/system/network.h from include/includes.h from /home/laiptc6/samba-3.0.28a/source/dynconfig.c. | File /usr/include/rpc/auth.h from /usr/include/rpc/rpc.h from include/includes.h from /home/laiptc6/samba-3.0.28a/source/dynconfig.c. 7 user errors 3 warnings The following command failed: cc -Xc -D__EXTENSIONS__ -O -D_SAMBA_BUILD_=3 -I/home/laiptc6/samba-3.0.28a/source/popt -I/home/laiptc6/samba-3.0.28a/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -I/home/laiptc6/samba-3.0.28a/source/lib -D_SAMBA_BUILD_=3 -DCONFIGFILE="/usr/local/samba/lib/smb.conf" -DSBINDIR="/usr/local/samba/sbin" -DBINDIR="/usr/local/samba/bin" -DLMHOSTSFILE="/usr/local/samba/lib/lmhosts" -DSWATDIR="/usr/local/samba/swat" -DLOCKDIR="/usr/local/samba/var/locks" -DPIDDIR="/usr/local/samba/var/locks" -DLIBDIR="/usr/local/samba/lib" -DLOGFILEBASE="/usr/local/samba/var" -DSHLIBEXT="shared_libraries_disabled" -DCONFIGDIR="/usr/local/samba/lib" -DSMB_PASSWD_FILE="/usr/local/samba/private/smbpasswd" -DPRIVATE_DIR="/usr/local/samba/private" -fPIE -c /home/laiptc6/samba-3.0.28a/source/dynconfig.c -o dynconfig.o *** Error code 7 (bu21) make: fatal error. 4980-laiptc6:/home/laiptc6/samba-3.0.28a/source>