Link to home
Start Free TrialLog in
Avatar of jazzIIIlove
jazzIIIloveFlag for Sweden

asked on

LDAP search filter

Hi;

I have a website implementation that users need to login via LDAP.

The user search filter is (uid={0}) and when the users wants to login they can only login with distinguished name but they need to login with just username. Is this possible to tweak so that the user can login with their normal usernames?

Can you help me on this? Do you need some file for my LDAP?

Br.
Avatar of Maciej S
Maciej S
Flag of Poland image

I think it depends on your application/webserver.
In Apache ie. you can use:
AuthLDAPURL ldap://your.ldap.server/ou=SomeOU,dc=SomeDC,dc=RestOfDC?uid

Open in new window

With such configuration, Apache requires uid and searches for given uid in ou=SomeOU,dc=SomeDC,dc=RestOfDC
Avatar of jazzIIIlove

ASKER

Hi;

Thanks but i am running my site under Tomcat and I followed this LDAP setup https://www.howtoforge.com/linux_openldap_setup_server_client
and I cannot find the users unless I specify DN for the user...

Can you help?

Br.
Ok, now we have more informations - Tomcat :)

I assume you have something like "userPattern" in your server.xml and it is set to "uid={0}". Am I right? If so, change this to "uid={0},ou=YourOU,dc=YourDC". If no, post your tomcat configuration here (just the ldap part).
Hi oklit;

Sorry for the late response. I don't have anything set in server.xml for userPattern. Can you give me an example for this?

Br.
ASKER CERTIFIED SOLUTION
Avatar of Maciej S
Maciej S
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial