Net::LD...tra::AD(3)
π NAME π
Okay bestie, this is the manual page for Net::LDAP::Extra::AD β AD convenience methods. The manual name up top is Net::LD...tra::AD(3), filed under User Contributed Perl Documentation. Itβs section 3, and itβs giving βI do the fiddly password encoding so you donβt have toβ energy. π
β¨ SYNOPSIS β¨
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);
}
πΈ DESCRIPTION πΈ
Net::LDAP::Extra::AD is literally here to spare you from reinventing the wheel again and again just to correctly encode password strings so that they can be used in AD password change operations. Iconic, honestly. π«Ά
To do so, it provides the following methods, bestie:
π METHODS π
is_AD ( )
Tells you if the LDAP server youβre querying is an Active Directory Domain Controller. Because the check is done by querying the root DSE of the directory, it works without being bound to the directory. No bind, no problem. β¨
is_ADAM ( )
Tells you if the LDAP server youβre querying is running AD LDS (Active Directory Lightweight Directory Services), previously known as ADAM (Active Directory Application Mode). Because the check is done by querying the root DSE of the directory, it works without being bound to the directory. Slay. π¦
change_ADpassword ( DN, OLD_PASSWORD, NEW_PASSWORD )
Changes the password of the account given by DN from its old value OLD_PASSWORD to the new value NEW_PASSWORD. This method requires encrypted connections β like, actually, do not skip that part. π
reset_ADpassword ( DN, NEW_PASSWORD, OPTIONS )
Resets the password of the account given by DN to the value given in NEW_PASSWORD. OPTIONS is a list of key/value pairs. The following keys are recognized:
force_changeβ IfTRUE, the affected user is required to change the password at next login.
For this method to work, the caller needs to be bound to AD with sufficient permissions, and the connection needs to be encrypted. Both. Not one. Periodt. π
π¦ AUTHOR π¦
Huge shoutout to Peter Marschall <peter@adpm.de<gt> β ty for the wheel-sparing. π«Ά
π 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.
Thatβs the whole page, bestie π«Ά β perl v5.42.0, dated 2024-01-02, manual name Net::LD...tra::AD(3). Bye πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-ldap 0.68-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms