Skip to content

OpenLDAP:Get Last Password Reset

lbonanomi edited this page Mar 22, 2019 · 1 revision

Get users last password reset time in LDAP time.

/usr/bin/ldapsearch -D 'CN=$admin_username,OU=$USER_OU,DC=$SERVER,DC=$DOMAIN,DC=com' -w '$admin_password' -h $SERVER.$DOMAIN.com -b  "DC=$SERVER,DC=$DOMAIN,DC=com" samAccountName=$USER_TO_CHECK pwdLastSet

https://www.epochconverter.com/ldap will convert from LDAP timestamps to wall times or epoch-seconds

Clone this wiki locally