how to test my ldap server url using telnet
Asked Answered
M

3

5

i have an ldap server on my local and remote. I could telnet to my local ldap url, but i have trouble telnet to my remote.

telnet www.ilovebears.com 389 and i get an empty screen with a blinking cursor.

is this because of some socket configuration or that the port isn't available?

Mavis answered 30/1, 2015 at 18:53 Comment(4)
As far as I see it everything is correct. Now you have to query LDAP in order to get results. What are you looking for? Take a look HereUnwish
i'm trying to get the list of users and the ou attribute of each userMavis
Ok, but I'm afraid with telnet you cannot do it. You have to use the proper dialog and obey the rules. The DirectoryEntry class of Microsoft .NET is a good starting point.Unwish
Does this answer your question? Is it possible to send LDAP "requests" via telnet?Peele
C
7

telnet www.ilovebears.com 389 and i get an empty screen with a blinking cursor

That's exactly what you should get. LDAP doesn't speak Telnet. All you can accomplish with a Telnet client is to establish that the server can be connected to.

If you want to exercise the server as an LDAP server you have to use an LDAP client.

Community answered 30/1, 2015 at 22:28 Comment(3)
yes i understand LDAP client is used outside code (such as ldapadmin.exe) but how to use it in Java thats my challenge. any thoughts @EJP?Mavis
@Mavis That may be your 'challenge', but it wasn't your question. You didn't mention Java. Since you now ask, there are several LDAP APIs for Java, and one is built right into Java itself: JNDI.Community
flawless answers!Karaite
Q
1

Your directory server was definitely listening on port 389 at www.ilovebears.com; however, it is no longer.

Do you really need/want to have your server listening on an open port on the Internet?

Quell answered 30/1, 2015 at 19:8 Comment(1)
the url was an example for an internal enterprise ldap urlMavis
T
0

Maybe a little bit late, but here you may find a very basic implementation of a java based LDAP client, very useful for debugging.

Hint : you may use ldaps://x.x.x.x:y for the LDAP over SSL as well...

Thistly answered 29/10, 2018 at 10:33 Comment(1)
Not the best quality example, and specific to Active Directory.Community

© 2022 - 2024 — McMap. All rights reserved.