Net::LDAP::Extension::eDirectoryPassword - LDAPv3 extension object to retrieve eDirectory Universal Password
use Net::LDAP; use Net::LDAP::Extension::eDirectoryPassword; $ldap = Net::LDAP->new ("edirectory.example.org"); $ldap->bind ('cn=admin,o=example", password => 'adminPassword'); $mesg = $ldap->get_edir_password ('cn=user,ou=context,o=example'); $mesg->code() || die $mesg->error(); print "Universal Password for ", $dn, " is ", $mesg->edir_password() , "\n";
Net::LDAP::Extension::eDirectoryPassword implements Novell's NMASLDAP_GET_PASSWORD_REQUEST extended LDAPv3 operation. This allows you to retrieve a cleartext Universal Password from a properly configured eDirectory instance.
This module extends the Net::LDAP object by another method.
Retrieve a cleartext Universal Password.
$dn is the full distinguished name (as a string) of the iNetOrgPerson object for which you want to retrieve the Universal Password.
Return the password retrieved by the previous
get_edir_password() call as a string. If no password is available, undef is returned.
This method is an extension of the Net::LDAP::Message response object returned in reply to
Novell's mechanism for retrieving Universal Passwords via LDAPv3 is poorly documented. Perhaps the best documentation exists in the form of the FreeRadius project's http://freeradius.org/ source code. This module is a pure Perl implementaion of their
The module assumes that you've already configured your eDirectory to support Universal Passwords, and Universal Password retrieval. This is not eDirectory's default configuration. At the very least, you have to create an administrative user and grant it specific permission to retrieve the cleartext password. See http://www.novell.com/documentation/edir_radius/index.html
Guy Antony Halse <email@example.com>,
Copyright (c) 2008, Rhodes University, All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Rhodes University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.