Questions tagged [netldap]

43 questions
0
votes
2 answers

Using Net::LDAP or ldapsearch to return attributes of object attributes

In our corporate LDAP structure a 'user' has two attributes: uid = the id of the user manager = the DN of the user's manager Since I'm writing a script to find out the organization chain for a user, I'd like to be able to find the uid of a manager…
wsaxton
  • 1,030
  • 15
  • 34
0
votes
1 answer

How to query list of objects in an Active Directory OU from Ruby

I'm trying to query a list of obejcts in a specific OU from our organizations Active Directory from within a Ruby-based application. I've been trying out the net/ldap gem (docs here) starting with the basic example provided. Here's my edited…
208_man
  • 1,440
  • 3
  • 28
  • 59
0
votes
1 answer

use file for filter in Perl Net::LDAP

when i'm doing an LDAPsearch manually on the commandline, i can do it so that the filter attribute can come off a file like this : ldapsearch -v -h -D "" -b "OU=myou,DC=mydc" -f myqueries.txt "(cn=%s)" myqueries.txt contains entries such…
olivierg
  • 728
  • 7
  • 26
0
votes
1 answer

How to search roles in ldap recursively with Net::LDAP in Ruby

I'm creating a self service with the possibility to grant application roles (defined in a meta [ldap]) for a user. Our structure in the meta is not uniform. It looks like this: o=meta ou=Firm ou=AppRoles ou=GitLab cn=Admin …
toxerli
  • 17
  • 8
0
votes
1 answer

Is there a way to print the exact command being sent to LDAP server by ruby-net-ldap?

The following code to move an account to another OU is failing: @net_ldap.rename( olddn:"CN=TestAMS\\,Henry,OU=Flemington,OU=NJ Region 4,OU=Agents,DC=nj,DC=tri,DC=nrt", newrdn:"CN=#TestAMS,Henry", delete_attributes:true, …
Rayhan Muktader
  • 2,038
  • 2
  • 15
  • 32
0
votes
2 answers

How do I debug ruby-ldap when a method only returns false?

My goal is to move an account to another OU. My understanding is that the following code should do the job. However, it returns false. There is no error, warning or exceptions. How do I debug why this isn't working? secure_ldap.rename( olddn:…
Rayhan Muktader
  • 2,038
  • 2
  • 15
  • 32
0
votes
1 answer

Getting "000004DC: LdapErr: DSID-0C090752." when performing bind in perl using Net::LDAP

Objective is to get the "dn" attribute of all the computers in my Active Directory server. When the code executes I get: "000004DC: LdapErr: DSID-0C090752, comment: In order to perform this operation a successful bind must be completed on the…
scryptKiddy
  • 427
  • 2
  • 9
  • 18
0
votes
1 answer

Getting value formatted as ["example"]

I'm working with NET-LDAP API using Ruby on Rails: @ldap.search( :base => @treebase, :filter => @filter ) do |entry| entry.cn When I get the entry.cn value it comes formatted as ["example"] How do I get this value without the characters [" "]?
0
votes
1 answer

Binding to LDAP with multiple certs. in ruby

I'm using https://github.com/ruby-ldap/ruby-net-ldap gem to connect/bind to LDAP treebase = "ou=xxxxxx,dc=xxxxx,dc=xx" credentials = { :username => "myusername,ou=xxxxxx,dc=xxxxx,dc=xx", :password =>…
Maged Makled
  • 1,918
  • 22
  • 25
0
votes
1 answer

MS AD2008 - Unable to force password change at next login using Perl Net::LDAPS and userAccountControl attribute

I am connecting to an Active Directory 2008 Domain Controller using perl Net::LDAPS and trying to set the "User must change password at next logon" account option and it's not working. I am able to create, modify, delete, and move different objects…
Drew
  • 4,215
  • 3
  • 26
  • 40
0
votes
1 answer

Ruby on Rails - LDAP based authentication

this is my first post on SO, but I have been reader for long time :) I'm currently working on LDAP authentication for Rails app. I'm using ruby Net::LDAP library - I'm abble to succesfully bind and login using technical account and search for a…
Sykur
  • 3
  • 2
0
votes
1 answer

Extracting data from net ldap response containing image

In my application I sync users image uploaded as photo field in the LDAP, I am using NET::LDAP for the same. the object returned for the image field is of type Net::BER::BerIdentifiedArray, I can convert it to Net::BER. My question is how do I…
Ross
  • 1,562
  • 1
  • 15
  • 26
0
votes
1 answer

How to do a search-by-DN using Net::LDAP

I want to check if a given DN exists in the LDAP directory, using Perl and Net::LDAP. So, I figured I'd do something like this: my $dn = 'uid=foo,ou=bar,ou=baz'; $ldap->search(base => $dn, scope => 'base', attrs => ['dn']); However, that results in…
derobert
  • 49,731
  • 15
  • 94
  • 124
1 2
3