1Net::LDAP::Extension::SUestePrasCsownotrrdi(b3u)ted PerlNeDto:c:uLmDeAnPt:a:tEixotnension::SetPassword(3)
2
3
4

NAME

6       Net::LDAP::Extension::SetPassword - LDAPv3 Modify Password extension
7       object
8

SYNOPSIS

10        use Net::LDAP;
11        use Net::LDAP::Extension::SetPassword;
12
13        $ldap = Net::LDAP->new( "ldap.mydomain.eg" );
14
15        $ldap->bind('cn=Joe User,cn=People,dc=mydomain,dc=eg",
16                    password => 'oldPassword');
17
18        $mesg = $ldap->set_password( oldpasswd => 'oldPassword' );
19
20        die "error: ", $mesg->code(), ": ", $mesg->error()  if ($mesg->code());
21
22        print "changed your password to", $mesg->gen_password() , "\n";
23

DESCRIPTION

25       "Net::LDAP::Extension::SetPassword" implements the "Modify Password"
26       extended LDAPv3 operation as described in RFC 3062.
27
28       It implements no object by itself but extends the Net::LDAP object by
29       another method:
30

METHODS

32       set_password ( OPTIONS )
33           Set the password for a user.
34
35           OPTIONS is a list of key/value pairs. The following keys are recog‐
36           nized:
37
38           user
39               If present, this option contains the octet string representa‐
40               tion of the user associated with the request.  Depending on how
41               users are identified in the directory this string may or may
42               not be a DN according to RFC 2253.
43
44               If this option is not present, the request acts up upon the
45               password of the user currently associated with the LDAP ses‐
46               sion.
47
48           oldpasswd
49               This option, if present, must contain the current password of
50               the user for whom this operation is performed.
51
52               It depends on the server's implementation in which cirumstances
53               this option is allowed to be missing.
54
55           newpasswd
56               If present, this option contains the desired password for the
57               user for whom the operation is performed.
58
59               Depending on the server's implementation this option may be
60               required by the LDAP server.
61
62       gen_password ( )
63           Return the password generated in the previous "set_password()"
64           call.
65
66           This method is a method of the Net::LDAP::Message response object
67           returned in reply to "set_password()" in case the "set_password()"
68           call succeeded.
69
70           By this method the caller can query for the value of the password
71           in case he did not call "set_password()" with the "newpasswd"
72           option.
73

SEE ALSO

75       Net::LDAP, Net::LDAP::Extension
76

AUTHOR

78       Graham Barr <gbarr@pobox.com>, documentation by Peter Marschall
79       <peter@adpm.de>.
80
81       Please report any bugs, or post any suggestions, to the perl-ldap mail‐
82       ing list <perl-ldap@perl.org>
83
85       Copyright (c) 2002-2004 Graham Barr. All rights reserved. This program
86       is free software; you can redistribute it and/or modify it under the
87       same terms as Perl itself.
88
89
90
91perl v5.8.8                       2007-02-1N0et::LDAP::Extension::SetPassword(3)
Impressum