VMware

This Question is Answered

2 "helpful" answers available (6 pts)
1 2 Previous Next 29 Replies Last post: Jul 27, 2006 8:05 AM by nick.couchman   Go to original post

Re: Auth problems

16. Jun 26, 2006 6:38 AM in response to: AndersN
Click to view nick.couchman's profile Champion 4,969 posts since
Jan 13, 2006
That makes sense - I'm still puzzled by your initial problem, though - I run LDAP over SSL/TLS here (I have to - my Novell eDirectory servers don't allow me to authenticate unencrypted) and I've never seen this happen.

Re: Auth problems

18. Jun 26, 2006 6:59 AM in response to: AndersN
Click to view nick.couchman's profile Champion 4,969 posts since
Jan 13, 2006
Yeah - I'm running SuSE 10.0 and SLES9 here and haven't seen those issues. I'm mainly running the 32-bit O/S's, but I have one server running SLES9 x86_64 and it seems to run fine.

Re: Auth problems

20. Jun 26, 2006 7:11 AM in response to: AndersN
Click to view nick.couchman's profile Champion 4,969 posts since
Jan 13, 2006
Oh, come on VMware!! That's lame! I'll try to see if I can poke around the 64-bit box here and look at anything I might have missed earlier. It's got to be something simple that I'm overlooking...

Re: Auth problems (LDAP backend with TLS)

21. Jun 26, 2006 9:08 AM in response to: AndersN
Click to view roundstozero's profile Novice 18 posts since
Nov 20, 2004
I don't know if this is related to your problem but I am having a similar problem trying to get Apache to authenticate against secure LDAP. I think I came up with a solution (just a few minutes ago in fact!) and I saw your post and it looked similar. I haven't had time to test it out though.

Apparently LDAP clients can be really strict about certificate checking. The certificate that your LDAP server uses should be signed by a real CA or a CA that you created yourself. Then in the client (Apache for me or VMware server in your case) I had to point it at the certificate file for the CA so that it would trust the LDAP server's certificate. However, I still had problems.

I believe what the problem is in my case and maybe yours too, is that it is doing strict checking of the hostname on the certificate (the CN of the certificate). For instance, on the cert I have my FQDN but in Apache I was just using "localhost". I need to try changing that to be the FQDN and see if that works.

I don't know where the option for this would be for VMware server but it's s start. Maybe it's actually an xinetd setting or something. Like I said, I don't know if this is your problem, but for me Apache works fine if I switch to insecure LDAP, just like VMware server works fine for you if you do the same.

Re: Auth problems (LDAP backend with TLS)

23. Jun 26, 2006 11:40 AM in response to: AndersN
Click to view roundstozero's profile Novice 18 posts since
Nov 20, 2004
OK, if you're sure. All other applications worked fine for me with LDAP and TLS too, until I got to Apache. Of course if you have it working in Apache too, you're probably all set. :)

Re: Auth problems (LDAP backend with TLS)

24. Jul 24, 2006 3:23 PM in response to: AndersN
Click to view nick.couchman's profile Champion 4,969 posts since
Jan 13, 2006
A few years later...it looks like, for some inexplicable reason, VMware has tied their binaries down to the libssl.so.0.9.7 library. Most of the stuff in SuSE 10.1 is linked against the libssl.so.0.9.8 library. For some reason, they don't like to talk to one another. I'm still trying to figure out if there's any way this can be overcome, but so far have only run into more walls. I imagine the steps to fixing this on SuSE 10.1 would go something like this:
1) Download, (compile, ) and install OpenSSL 0.9.7.
2) Download, compile, and install OpenLDAP 2.3.x, making sure to link against OpenSSL 0.9.7.
3) Download, compile, and install nss_ldap and pam_ldap, making sure to link against OpenLDAP libraries that were linked against SSL 0.9.7.

The maddening part is why this would even have to be version-specific to begin with?! I seriously doubt that OpenSSL 0.9.7 is THAT different from OpenSSL 0.9.8, but I'm sure there's something in the code somewhere that checks the version and fails for some reason or another if the versions of OpenSSL don't match.
Click to view nick.couchman's profile Champion 4,969 posts since
Jan 13, 2006
Okay, I've come up with a work-around for SuSE 10.1 to enable LDAP over SSL and not break other things on the system. It's a little bit complicated, I know, but it does work.

1) Using YaST, search for and install the compat packages. The important ones are compat and compat-openssl097g.
2) Download a previous version of the pam_ldap RPM for SuSE (the SuSE 10.0 one works well). These RPMS can be found at the SuSE mirror sites in the main RPM directory.
3) Uninstall the version of pam_ldap included with SuSE 10.1. Install the SuSE 10.0 version (may have to do it by hand using rpm -ivh).
4) Go to the /etc/security directory and "cp pam_ldap.so pam_ldap.so.old".
5) Edit the /etc/pam.d/vmware-authd file. Make the file look like this:
[code]
#%PAM-1.0
auth sufficient /lib/security/pam_ldap.so.old
auth sufficient /lib/security/pam_unix2.so nullok use_first_pass
auth required /lib/security/pam_unix_auth.so nullok
account optional /lib/security/pam_ldap.so.old
account sufficient /lib/security/pam_unix2.so
account required /lib/security/pam_unix_acct.so
[/code]
by adding the pam_ldap.so.old lines.
6) Using YaST, reinstall the SuSE 10.1 version of pam_ldap.
7) Make sure your ldap.conf files on the host are set up correctly to talk to your LDAP servers.

Your system should now authenticate both VMware sessions and other system sessions correctly via LDAP over SSL.

@VMware: Please compile/link VMware Server correctly so that the later SSL versions work without this kind of hacking.
Click to view petr's profile Champion 7,218 posts since
Jul 10, 2003
What do you mean by linking it correctly ? Apps has to decide whether to use openssl 0.9.7 or 0.9.8 at build time. So there will be always systems where VMware will use one openssl version, while pam_ldap module another. And as you can see, on your system it is possible to install (older) openssl 0.9.7. Users of boxes with openssl 0.9.7 have no luxury of being able to install openssl 0.9.8 without breaking everything...

You should talk to the openssl developers instead, asking them to be serious about backward compatibility. Or about coexistence of different openssl libraries in one process. Glibc shows that (endless) backward compatibility it is doable...
Click to view nick.couchman's profile Champion 4,969 posts since
Jan 13, 2006
Well, you do make a good point about backward compatibility, but I wonder if the applications really have to be linked against a specific version of the OpenSSL library? If you do a "strings" on the VMware binaries, for example, they specify libssl.so.0.9.7. Why? Why not just link it against libssl.so so that, as long as the SSL calls are the same, the app will be compatible with other versions of SSL (0.9.6 or 0.9.8)?
Click to view petr's profile Champion 7,218 posts since
Jul 10, 2003
If you do a "strings" on the VMware binaries, for example, they specify
libssl.so.0.9.7. Why?

Because author of openssl library wanted it this way (it is from newer system, so it wants 0.9.8, but problem is same):

[code]ppc:~$ objdump -p /usr/lib/libssl.so

/usr/lib/libssl.so: file format elf32-i386

Program Header:
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x0003a8b8 memsz 0x0003a8b8 flags r-x
LOAD off 0x0003a8b8 vaddr 0x0003b8b8 paddr 0x0003b8b8 align 2**12
filesz 0x00003210 memsz 0x0000328c flags rw-
DYNAMIC off 0x0003afc0 vaddr 0x0003bfc0 paddr 0x0003bfc0 align 2**2
filesz 0x000000f8 memsz 0x000000f8 flags rw-
STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
filesz 0x00000000 memsz 0x00000000 flags rw-

Dynamic Section:
NEEDED libcrypto.so.0.9.8
NEEDED libdl.so.2
NEEDED libz.so.1
NEEDED libc.so.6
SONAME libssl.so.0.9.8
SYMBOLIC 0x0
INIT 0x9e48
FINI 0x35ca4
HASH 0xb4
STRTAB 0x3e28
SYMTAB 0x1388
STRSZ 0x2ec4
SYMENT 0x10
PLTGOT 0x3c10c
PLTRELSZ 0x798
PLTREL 0x11
JMPREL 0x96b0
REL 0x72c8
RELSZ 0x23e8
RELENT 0x8
VERDEF 0x7240
VERDEFNUM 0x2
VERNEED 0x7278
VERNEEDNUM 0x2
VERSYM 0x6cec
RELCOUNT 0x474

Version definitions:
1 0x01 0x09bcbd68 libssl.so.0.9.8
2 0x00 0x06692428 OPENSSL_0.9.8

Version References:
required from libc.so.6:
0x09691f73 0x00 05 GLIBC_2.1.3
0x0d696910 0x00 04 GLIBC_2.0
required from libcrypto.so.0.9.8:
0x06692428 0x00 03 OPENSSL_0.9.8

[/code]

As you can see above, author set library's SONAME to libssl.so.0.9.8. It means that when you link against libssl.so (using -lssl), resulting application will depend on libssl.so.0.9.8, and not on libssl.so. It also means that author believes that application linked against version openssl 0.9.8 cannot run with any other version - it can run with 0.9.8a,b,c,d,e,f,..., but not with 0.9.7 or 0.9.9.

(compare this with glibc - although file on my box is /lib/libc-2.4.90.so, it has SONAME set to libc.so.6 (like all other glibc versions had...), and version references on libssl.so.0.9.8 show that it will be satisfied with any glibc newer than 2.1.3...)
Click to view nick.couchman's profile Champion 4,969 posts since
Jan 13, 2006
Okay - thanks for clearing that up, I believe I understand, now. Yes, it would be nice if the good OpenSSL people would make things backward compatible. Until then I'll have to live with this work-around for any systems running SSL versions other than 0.9.7!

Of course, my real plan is eventually to move to ESX, so this won't be an issue, then :-).

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities