Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 810
  • Last Modified:

Perl Net::LDAP doesn't provide uidnumber under Sun Solaris

Dear experts,

I am using the Net::LDAP module on a Sun Solaris 64-bit Sparc machiune under perl version 5.13 to try to look up a numeric user ID and obtain the corresponding character login ID.  Everything works fine if I do the search based on the character login ID, but not if I do it based on the numeric UID.  I'm able to bind successfully, then use the instruction
$msg = $ldap -> search
    (
        base => "ou=People, dc=Enterprise, dc=mycompany, dc=com",
        filter => "uid=$parm_login_ID"
    );

But the attribute uidnumber does not appear in the list of values returned for a matching character login ID value.  I get no hits when I change the above instruction to "uidnumber=$parm_numeric_UID".  According to on-line reference materials, the attribute uidnumber is supposed to be part of the same database as is uid, viz. People, but it doesn't show up anywhere.  Is there anything wrong with my program, or did my company configure its local ldap database such that uidnumber is simply not an available attribute?

Thank you!
0
fireblood
Asked:
fireblood
  • 2
1 Solution
 
parparovCommented:
You should investigate the schema that your LDAP operates upon.

Then you can do something like this:
            my $schema = $ldap->schema;
            # get objectClasses
            @ocs = $schema->all_objectclasses;
            # Get the attributes
            @atts = $schema->all_attributes;

Open in new window

Consult Net::LDAP::Schema manual page for more information about available methods.
0
 
firebloodSAS ProgrammerAuthor Commented:
Thank you very much!  I was able to run your code on my system and it worked in showing me aspects of the LDAP configuration in my particular installation that I needed to pursue.  Once I drilled down through all the levels I was able to find the information I needed.  The key was the all_objectclasses method, which I didn't know about before.  Thanks again for a good solution.
0
 
parparovCommented:
You're welcome
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now