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 β€” If TRUE, 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 (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