# How to get userid using Net::LDAP

**URL:** <https://www.ruby-forum.com/t/how-to-get-userid-using-net-ldap/126701>\
**Category:** Ruby\
**Created:** [January 21, 2008, 2:27pm UTC](https://www.ruby-forum.com/t/how-to-get-userid-using-net-ldap/126701 "2008-01-21T14:27:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [January 21, 2008, 2:27pm UTC](https://www.ruby-forum.com/t/how-to-get-userid-using-net-ldap/126701/1 "2008-01-21T14:27:33Z")

</div>

Hi all,  
I am able to connect to ldap server through my ror application and  
now i wanna fetch more information about user using LDAP.  
Actually in my application i am authenticating through username and  
password now i wanna fetch more information about the user from LDAP  
server.  
Please tell me the steps or some code snippet that hopw to get more  
information about authenticated user.

Thanks  
Varun

---

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [January 21, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/how-to-get-userid-using-net-ldap/126701/2 "2008-01-21T14:42:43Z")

</div>

On Jan 21, 2008 8:27 AM, Varun G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi all,  
> I am able to connect to ldap server through my ror application and  
> now i wanna fetch more information about user using LDAP.  
> Actually in my application i am authenticating through username and  
> password now i wanna fetch more information about the user from LDAP  
> server.  
> Please tell me the steps or some code snippet that hopw to get more  
> information about authenticated user.

There is a very extensive Rdoc in the Net::LDAP library, which includes  
a  
introduction to the principles of LDAP, typical LDAP servers, and the  
information available from them.

By chance, did you happen to read it?

---

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [January 22, 2008, 7:15am UTC](https://www.ruby-forum.com/t/how-to-get-userid-using-net-ldap/126701/3 "2008-01-22T07:15:36Z")

</div>

Hi,  
I am not able to see rdoc for Net::LDAP please tell me where i can see  
this Rdocs please tell me the site name.  
If possible tell me some code snippet or function to get more  
information about the user through ldap server.

Thanks  
Varun

---

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [January 22, 2008, 2:22pm UTC](https://www.ruby-forum.com/t/how-to-get-userid-using-net-ldap/126701/4 "2008-01-22T14:22:52Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

On Jan 21, 2008, at 7:27 AM, Varun G. wrote:

> Hi all,  
> I am able to connect to ldap server through my ror application  
> and  
> now i wanna fetch more information about user using LDAP.  
> Actually in my application i am authenticating through username and  
> password now i wanna fetch more information about the user from LDAP  
> server.  
> Please tell me the steps or some code snippet that hopw to get more  
> information about authenticated user.

Perhaps you’d prefer to use ActiveLdap?

[https://rubyforge.org/projects/ruby-activeldap/](https://rubyforge.org/projects/ruby-activeldap/)

David M.  
Maia Mailguard [http://www.maiamailguard.com](http://www.maiamailguard.com)  
removed\_email\_address@domain.invalid

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFHle2XUy30ODPkzl0RAu7kAKDHEv+sqbg/cIpTPs+cg+mhWIaGuQCfUVts  
5sgSII8caPbCE3LvkL9dLZs=  
=zXzo  
-----END PGP SIGNATURE-----
