Homepage | Products | OX Knowledge Base | Support | Try Now | Contact | Company
OX Logo
Results 1 to 4 of 4
  1. #1
    fr3nd Guest

    Default groups not created when using memberAttributeIsDN=yes

    I have a ldap schema where membership to the group is defined using a complete dn like "uid=username,ou=users,dc=ldap" so I have configured ldapsync.conf to use "memberAttributeIsDN=yes", but when synchronising it doesn't create the groups.

    I've been checking the code and I've seen the function getUid() has a commented part. I tried to uncomment this and it worked straight away.

    I don't know why it was changed but it seems the new code doesn't work with the configuration I have.

  2. #2
    Join Date
    Mar 2010
    Location
    Winden, Germany
    Posts
    10

    Default

    Hi fr3nd,

    we expirienced the same problems. after checking the code i found the problem which was an incorrect search filter / dn combination. please modify "lib/OX/LDAPConnector/ldap.pm" in the following way and check again :

    ################################################## ##
    #
    # returns the uid from a distinguished name
    #
    ################################################## ##
    sub getUid()
    {
    my $self = shift;
    my $dn = shift;

    my $ldap = $self->{ldap};
    my $basedn = $self->{userbasedn};

    my $filter = "dn=$dn";

    #BEGIN MODIFICATION
    my @splitdn = split(/,/, $dn);
    my $filter = shift(@splitdn);
    my $basedn = join(",", @splitdn);

    my $mesg = $self->subsearch($ldap, $basedn, $filter);
    if (my $entry = $mesg->pop_entry())
    {
    print ($entry->get_value($self->{uidattribute})."\n");
    return ($entry->get_value($self->{uidattribute}));
    }
    #END MODIFICATION
    }

    with kind regards
    lars

  3. #3
    Join Date
    Sep 2008
    Posts
    28

    Default

    Hi,

    can you please tell what kind of ldap server you are using? I don't really where the problem with this function is.

  4. #4
    Join Date
    Mar 2010
    Location
    Winden, Germany
    Posts
    10

    Default

    Hi,
    we're using OpenLDAP 2.4.12 on SuSE Linux Enterprise Server 11. However, by checking the source code of oxldapsync and using the generated search filter with ldapsearch on the command line we modified the source code as already posted and the oxldapsync worked fined.

    kind regards
    lars

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •