Solved

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

Posted on 2011-09-06
3
783 Views
Last Modified: 2013-12-27
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
Comment
Question by:fireblood
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
parparov earned 500 total points
ID: 36491868
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
 

Author Closing Comment

by:fireblood
ID: 36544824
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
 
LVL 9

Expert Comment

by:parparov
ID: 36545065
You're welcome
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Database restore 8 77
Data quality checks 2 49
What does "flush tables;" do exactly? 7 65
Linux hostname change 2 51
This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now