.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "Net::LDAP::Extra::AD 3" .TH Net::LDAP::Extra::AD 3 2025-12-14 "perl v5.42.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Net::LDAP::Extra::AD \-\- AD convenience methods .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Net::LDAP::Extra qw(AD); \& \& $ldap = Net::LDAP\->new( ... ); \& \& ... \& \& if ($ldap\->is_AD || $ldap\->is_ADAM) { \& $ldap\->change_ADpassword($dn, $old_password, $new_password); \& } .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Net::LDAP::Extra::AD tries to spare users the necessity to reinvent the wheel again and again in order to correctly encode password strings so that they can be used in AD password change operations. .PP To do so, it provides the following methods: .SH METHODS .IX Header "METHODS" .IP "is_AD ( )" 4 .IX Item "is_AD ( )" Tell if the LDAP server queried is an Active Directory Domain Controller. .Sp As the check is done by querying the root DSE of the directory, it works without being bound to the directory. .IP "is_ADAM ( )" 4 .IX Item "is_ADAM ( )" Tell if the LDAP server queried is running AD LDS (Active Directory Lightweight Directory Services), previously known as ADAM (Active Directory Application Mode). .Sp As the check is done by querying the root DSE of the directory, it works without being bound to the directory. .IP "change_ADpassword ( DN, OLD_PASSWORD, NEW_PASSWORD )" 4 .IX Item "change_ADpassword ( DN, OLD_PASSWORD, NEW_PASSWORD )" Change the password of the account given by \fIDN\fR from its old value \fIOLD_PASSWORD\fR to the new value \fINEW_PASSWORD\fR. .Sp This method requires encrypted connections. .IP "reset_ADpassword ( DN, NEW_PASSWORD, OPTIONS )" 4 .IX Item "reset_ADpassword ( DN, NEW_PASSWORD, OPTIONS )" Reset the password of the account given by \fIDN\fR to the value given in \fINEW_PASSWORD\fR. OPTIONS is a list of key/value pairs. The following keys are recognized: .RS 4 .IP force_change 4 .IX Item "force_change" If TRUE, the affected user is required to change the password at next login. .RE .RS 4 .Sp For this method to work, the caller needs to be bound to AD with sufficient permissions, and the connection needs to be encrypted. .RE .SH AUTHOR .IX Header "AUTHOR" Peter Marschall .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (c) 2012 Peter Marschall. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.