DDS
DDS

Reputation: 2479

LDAP search vs whoami

I want to ask what is the difference between ldapsearch and ldapwhoami because I really can't get ii: it looks that whoami is a just functionality subset.

I ask this because I'm writing a login system, so my goal is to check the credentials against the server. The software itself has configured credentials because no query right is granted to anonymus users.

I havn't a clear idea on what should I do: if a simple 'bind' request or perform a whoami query.

Upvotes: 0

Views: 1811

Answers (1)

Michael Ströder
Michael Ströder

Reputation: 1318

The command-line tool ldapsearch sends an LDAP search operation while ldapwhoami sends a "Who am I?" extended operation to the LDAP server. Both command-line tools support to send bind operations of various kinds before that.

If you implement a login system you normally bind as a service account to the LDAP server, search the user's entry with a filter containing the input username and then send a simple bind operation with the user entry's DN and the user's password.

Upvotes: 2

Related Questions