aspose file tools*
The moose likes Tomcat and the fly likes How to confgure multiple organisational units for ldap configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to confgure multiple organisational units for ldap configuration" Watch "How to confgure multiple organisational units for ldap configuration" New topic
Author

How to confgure multiple organisational units for ldap configuration

suman vadde
Greenhorn

Joined: Mar 07, 2013
Posts: 4
Hi Friends,


I'm having a problem with configuring multiple OUs in tomcat 6.0.14.



My application uses the LDAP for authentication. All the suers are not belongs to the same OU.

So I want to search multiple OUs. Due to performace, decided not to configure root level which search the entire directory.



So please advise me on configuring multiple OUs.



I have two OUs like:



ou=users,ou=java team,ou=development,ou=software unit,DC=SOU,DC=example,DC=com

and

OU=php team,OU=Users,OU=Testing,OU=software unit,DC=SOU,DC=example,DC=com



Below is my configuration details.



I'm using search scope as SearchControls.SUBTREE_SCOPE in my java class.



Any help is highly appreciated.

Tomcat's server.xml:

<Resource name="myapp"

auth="Container"

type="com.sun.jndi.ldap.LdapCtx"

factory="com.test.MyLdapFactory"

java.naming.factory.initial="com.sun.jndi.ldap.LdapCtxFactory"

com.sun.jndi.ldap.connect.pool="false"

java.naming.provider.url="ldap://com.test.net:389"

java.naming.security.authentication="simple"

java.naming.security.principal="myuser"

java.naming.security.credentials="mypassword"

ldap.base="ou=users,ou=java team,ou=development,ou=software unit,DC=SOU,DC=example,DC=com"

ldap.filter="samaccountname"

/>




NOTE: And also sometimes it is getting timeout exception. after restarting tomcat it is connecting fine. Please help me on this.


Thanks,

Suman


Reda Mokrane
Ranch Hand

Joined: Jul 25, 2001
Posts: 237
Not sure if this will help you but can try it someting like:userPattern=" (cn={0},ou=FirstOU,dc=yourDC,dc=DCXXX)(cn={0},ou=FirstOU,dc=yourDC,dc=DCXXX)




-Reda
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

1. There's a "Code" button on our message editor. If you use that to generate tags around pre-formatted text such as Java code and XML, it's a lot easier for us to read.

2. Look back about a week or so in this forum. This question has been popular recently.

3. There's nothing really special about doing this kind of request in Tomcat. You'd set up the same sort of LDAP query, Tomcat or not. So you might want to ask how to do queries like this in our LDAP forum.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to confgure multiple organisational units for ldap configuration