Net::LDAP and telephonenumber attribute

P

pearly

Hi,

Using the LDAP service of a Lotus Notes / Domino server, I cannot
get the telephone attribute for people. Sad it is but Lotus like M$
call it telephonenumber. I use 'net/ldap' for this which works fine
for
other attributes. Net::LDAP#search delivers an Array of
Net::LDAP::Entry objects, and I can call attributes like the
following simplified example shows:

ldap.search( :base => base, :filter => ldap_filter ) do |entry|
puts "DN: #{entry.dn} Name: #{entry.givenname} #{entry.sn}"
end

Now, it looks like the telephonenumber attribute is not delivered.
Having done a simillar application in Perl (using Net::LDAP) which
still works with the same LDAP server and parameters, I know the
attribute should be there. But the following results in a
NoMethodError exception.

ldap.search( :base => base, :filter => ldap_filter ) do |entry|
puts "Phone: #{entry.telephonenumber}"
end

Using entry.telephone doesn't help, and adding the attribute
list to the Net::LDAP#search (e.g. [:dn, :sn, :telephonenumber])
doesn't help.

Btw: In the above code block I tried entry.methods.sort
and was really surprised it did not show things like 'dn' or
'mail' as its methods; however they are working.

Any idea how to get this telephonenumber attribute?

MP
 
P

pearly

Hi. Strange: Looks like somebody posted a reply
which I could not see - neither in the news reader
nor in groups.google.com.
The sender's ID was 'garbagecat10'.
I found the reply when giving it another trial
under "Forbiddenweb Archive". Anybody any idea
what happened there?

Ok, here is the contributor's question back to me,
so he/her or anybody else may have further ideas:
What happens if you use Net::LDAP::Entry#each to dump
out all of the attributes that were returned from the
server?

This results in the following list:

roaminguser
mailsystem
sn
checkpassword
cn
messagestorage
passwordchangeinterval
displayname
encryptincomingmail
uid
passwordgraceperiod
originalmodtime
roamcleansetting
givenname
objectclass
roamcleanper
mail
maildomain
personaltitle
availablefordirsync
dn

So no telephonenumber, no telephone.

Any further ideas?
Thanks to all of you.
MP
 
B

barjunk

Hi. Strange: Looks like somebody posted a reply
which I could not see - neither in the news reader
nor in groups.google.com.
The sender's ID was 'garbagecat10'.
I found the reply when giving it another trial
under "Forbiddenweb Archive". Anybody any idea
what happened there?

Ok, here is the contributor's question back to me,
so he/her or anybody else may have further ideas:


This results in the following list:

roaminguser
mailsystem
sn
checkpassword
cn
messagestorage
passwordchangeinterval
displayname
encryptincomingmail
uid
passwordgraceperiod
originalmodtime
roamcleansetting
givenname
objectclass
roamcleanper
mail
maildomain
personaltitle
availablefordirsync
dn

So no telephonenumber, no telephone.

Any further ideas?
Thanks to all of you.
MP


The first thing that jumps to my mind is rights...have you tried this
code as the "manager"?

Anyway to turn logging way up on the server side so you can compare
the requests that work against those that don't?

Mike B.
 
T

Ted Knab

If you have access to the LDAP server admin, you might want to ask if
there is a filter preventing anonymous binds from revealing the telephone
attribute.

Your code seems to imply that your are doing anonymous binds.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top