Hi! Stuart,

I could get the hierarchical LDAP login working by adding on to Kyle's
ADAuthentication code. I have added few lines of code (
x = dirObject.getName() + ",DC=staff,DC=main,DC=ntu,Dc=edu,DC=sg";) to
get a user's context and then concatenate with the university domain
controller path. This will allow staff from different department having
different context to login to DSpace. Could you please give your
comments? 

Thanks,
Jayan

//Added Section of code

SearchControls srchInfo = new SearchControls();
srchInfo.setSearchScope(SearchControls.SUBTREE_SCOPE);
String searchBase = "DC=staff,DC=main,DC=ntu,Dc=edu,DC=sg";
NamingEnumeration dirObjects = ctx.search(searchBase,
adEPersonUserNameAttribute + "=" + username, srchInfo);
while (dirObjects != null && dirObjects.hasMoreElements()) {
                SearchResult dirObject =
(SearchResult)dirObjects.next();
x = dirObject.getName() + ",DC=staff,DC=main,DC=ntu,Dc=edu,DC=sg";
}

NamingEnumeration LDAPEntry = ctxSearch.search(x,
adEPersonUserNameAttribute + "=" + username, sc);



-----Original Message-----
From: Stuart Lewis [sdl] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 2:20 PM
To: Jayan Chirayath Kurian; [email protected]
Subject: Re: [Dspace-tech] DSpace LDAP login using Windows 2003 Active
Directory

Hi Jayan,

> (2) Other valid users with object context as
> ou=Users,ou=SCI,dc=staff,dc=main,dc=ntu,dc=edu,dc=sg cannot login. How
to
> enable this although these users come under the same AD root context
> dc=staff,dc=main,dc=ntu,dc=edu,dc=sg.
>  
> Can you please suggest how to make LDAP work with all users under
different
> OU? 

Try this patch:

http://sourceforge.net/tracker/index.php?func=detail&aid=1597831&group_i
d=19
984&atid=319984

If it works OK for you, please could you add a comment saying so to the
patch in SourceForge?

Hope this helps,


Stuart
_________________________________________________________________

Datblygydd Cymwysiadau'r We            Web Applications Developer
Gwasanaethau Gwybodaeth                      Information Services
Prifysgol Cymru Aberystwyth       University of Wales Aberystwyth

            E-bost / E-mail: [EMAIL PROTECTED]
                 Ffon / Tel: (01970) 622860
_________________________________________________________________


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to