Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to confgure multiple organisational units for ldap configuration

 
suman vadde
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic