Hello,
I have two servers, one is running Windows NT 4 and its address is
internet.myname.com, which is the one that has the external ip, i.e.
it's the one connected to the internet, and the other server is running
Win2000 and its address is server.myname.com and it has the active
directory, i.e. all the users have account in the server.myname.com
machine.
The internet.myname.com machine also runs e.g. microsoft exchange email
server, and it gets the user accounts for the emails from the
server.myname.com active directory.
I installed ejabberd (tried both 0.9.8 and 1.0.0) on the
internet.myname.com machine, and with the internal authentication it
works well. But I didn't manage to get LDAP authentication to work. I
have access to everything on these machines, i.e. I know the admin
login/password for the active directory machine etc., but I wasn't the
one who set it up in the 1st place, and I'm not sure where to look for
the correct definitions to use in the ejabberd.cfg file - I tried some
obvious settings for uid, base, rootdn etc., and it didn't work. I
downloaded PortQry from http://support.microsoft.com/?kbid=310456
and I'm pasting its output below. Could anyone please help me to get
the correct LDAP settings, or tell me which other utils I could run
(that probably were already installed with win2000?) in order to get the
correct settings?
Also, another question: will the addresses for the users of the jabber accounts be user@internet.myname.com or user@myname.com
? In ejabberd.cfg I had to put "{hosts, ["internet.myname.com"]}." for
it to work, but the final addresses for each user should really be user@myname.com, like the email addresses.
Thanks a lot in advance,
Iddo
example for ldap ejabberd settings that didn't work:
%{auth_method, internal}.
{auth_method, ldap}.
{ldap_servers, ["server.myname.com"]}.
{ldap_uidattr, "uid"}.
{ldap_base, "dc=myname,dc=com"}.
{ldap_rootdn, "dc=myname,dc=com"}.
{ldap_password, "mypwd"}.
{hosts, ["internet.myname.com"]}.
(I'm not using SSL)
PortQry output:
D:\temp\PortQryV2>PortQry.exe -n server.myname.com -p udp -e 389
Querying target system called:
server.myname.com
Attempting to resolve name to IP address...
Name resolved to 192.168.0.15
querying...
UDP port 389 (unknown service): LISTENING or FILTERED
Using ephemeral source port
Sending LDAP query to UDP port 389...
LDAP query response:
currentdate: 02/06/2006 14:54:50 (unadjusted GMT)
subschemaSubentry: CN=Aggregate,CN=Schema,CN=Configuration,DC=myname,DC=com
dsServiceName: CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Primary,CN=Sites,CN=Configuration,DC=myname,DC=com
namingContexts: CN=Schema,CN=Configuration,DC=myname,DC=com
defaultNamingContext: DC=myname,DC=com
schemaNamingContext: CN=Schema,CN=Configuration,DC=myname,DC=com
configurationNamingContext: CN=Configuration,DC=myname,DC=com
rootDomainNamingContext: DC=myname,DC=com
supportedControl: 1.2.840.113556.1.4.319
supportedLDAPVersion: 3
supportedLDAPPolicies: MaxPoolThreads
highestCommittedUSN: 699288
supportedSASLMechanisms: GSSAPI
dnsHostName: SERVER.myname.com
ldapServiceName: myname.com:server$@myname.COM
serverName: CN=SERVER,CN=Servers,CN=Primary,CN=Sites,CN=Configuration,DC=myname,DC=com
supportedCapabilities: 1.2.840.113556.1.4.800
isSynchronized: TRUE
isGlobalCatalogReady: TRUE
======== End of LDAP query response ========
UDP port 389 is LISTENING
LDAP and a few more questions
I got SRV records working (had to replace Windows NT 4.0 DNS server with Bind), so now name@myserver.com addresses work great, same as the email addresses, and it communicates without problems with all the public jabber servers that I tried, including google-talk.
I still have no idea about whether LDAP is supposed to work with active-directory, I see some forum posts that say that it works, so is that patch that I mentioned below relevant?
Also, would LDAP prevent me from using shared-roster? It's a very nice feature... The shared-roster tutorial says that it won't work, but the comments below it say that it does work?
BTW, I tried Psi and Exodus with shared-roster (everybody group created with @all@), and they both also show myself (as offline) in the everybody group, is there a way to remove that? If I remove it, it re-appears when I reconnect. (Tkabber works correctly and doesn't show my own account as part of the group, but I'm interested in Psi for jingle/VoIP).
Also, another question: is there a good way to deny connection to the ejabberd server for anyone who doesn't connect from within the company, i.e. for anyone whose current host doesn't match the ejabberd server host, or if he's not in the domain or something like that?
Thanks in advance for any comments,
Iddo