[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Inserting userPassword attribute programatically
- To: <openldap-software@OpenLDAP.org>
- Subject: Inserting userPassword attribute programatically
- From: "James Courtney" <Jcourtney@inphonic.com>
- Date: Thu, 25 Mar 2004 19:04:53 -0800
- Content-class: urn:content-classes:message
- Thread-index: AcQS3yt4tkgxdpa7RE2zXaE5CTebBw==
- Thread-topic: Inserting userPassword attribute programatically
I'm running OpenLDAP 2.1.25. I'm creating several entries
programatically using Net::LDAP for perl. Does anyone know how I should
be adding the userPassword attribute?
I try to just add the plain password string like the code snippet below
and all the entries add fine but I end up with no value for the
userPassword attribute for each entry. Do I need to convert to a
different data type before adding? Any assistance would be great.
Thanks!
Jamey
my $userentry = Net::LDAP::Entry->new() or die "some message";
$userentry->dn($userdn);
...
$userentry->add("userPassword" => $userpassword);
...
my $mesg = $ldap->add($userentry);
if ($mesg->code)
{
printf "\nsome other error message " . $mesg->error;
}
My core.schema shows this:
# system schema
#attributetype ( 2.5.4.35 NAME 'userPassword'
# DESC 'RFC2256/2307: password of user'
# EQUALITY octetStringMatch
# SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{128} )