Hi Debopam ,
I cannot answer the question on how it works because I have not looked at the source but I suspect under the covers it does some ldap lookup similar to the articles Deepak has provided. In terms of where the the ldap server is configured it will be in the Global security settings in admin console you need to select ldap as the active user registry. In the same screen it should provide a link to configure the ldap settings (host, port , base dn etc) . I believe this code will look at these configuration details to connect to ldap
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
a bit of art, as a gift, the permaculture playing cards