Mandi! Andrew Bartlett via samba In chel di` si favelave...> It is an operational attribute. simply add > msDS-UserPasswordExpiryTimeComputed > to the list of attributes requested when searching for the user.root at vdcsv1:~# ldbsearch -H /var/lib/samba/private/sam.ldb -b "dc=ad,dc=fvg,dc=lnf,dc=it" -s base "" maxPwdAge # record 1 dn: DC=ad,DC=fvg,DC=lnf,DC=it maxPwdAge: -77760000000000 # returned 1 records # 1 entries # 0 referrals root at vdcsv1:~# ldbsearch -H /var/lib/samba/private/sam.ldb -b "ou=Users,ou=FVG,dc=ad,dc=fvg,dc=lnf,dc=it" "(cn=gaio)" pwdlastSet msDS-UserPasswordExpiryTimeComputed # record 1 dn: CN=gaio,OU=Users,OU=FVG,DC=ad,DC=fvg,DC=lnf,DC=it pwdLastSet: 131529847334416590 msDS-UserPasswordExpiryTimeComputed: 131607607334416590 # returned 1 records # 1 entries # 0 referrals root at vdcsv1:~# echo "131529847334416590+77760000000000" | bc 131607607334416590 Cool! ;-) -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.lanostrafamiglia.it/ Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN) marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797 Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA! http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000 (cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
Andrew Bartlett
2017-Oct-27 18:24 UTC
[Samba] Some hint reading password expiration data...
On Fri, 2017-10-27 at 17:10 +0200, Marco Gaiarin via samba wrote:> Mandi! Andrew Bartlett via samba > In chel di` si favelave... > > > It is an operational attribute. simply add > > msDS-UserPasswordExpiryTimeComputed > > to the list of attributes requested when searching for the user. > > root at vdcsv1:~# ldbsearch -H /var/lib/samba/private/sam.ldb -b "dc=ad,dc=fvg,dc=lnf,dc=it" -s base "" maxPwdAge > # record 1 > dn: DC=ad,DC=fvg,DC=lnf,DC=it > maxPwdAge: -77760000000000 > > # returned 1 records > # 1 entries > # 0 referrals > root at vdcsv1:~# ldbsearch -H /var/lib/samba/private/sam.ldb -b "ou=Users,ou=FVG,dc=ad,dc=fvg,dc=lnf,dc=it" "(cn=gaio)" pwdlastSet msDS-UserPasswordExpiryTimeComputed > # record 1 > dn: CN=gaio,OU=Users,OU=FVG,DC=ad,DC=fvg,DC=lnf,DC=it > pwdLastSet: 131529847334416590 > msDS-UserPasswordExpiryTimeComputed: 131607607334416590 > > # returned 1 records > # 1 entries > # 0 referrals > root at vdcsv1:~# echo "131529847334416590+77760000000000" | bc > 131607607334416590 > > Cool! ;-)The advantage of using this is that when we eventually get to implementing password settings objects, this will use the PSO calculation, so you won't need to update your scripts. Thanks, Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
Mandi! Andrew Bartlett via samba In chel di` si favelave...> The advantage of using this is that when we eventually get to > implementing password settings objects, this will use the PSO > calculation, so you won't need to update your scripts.Cool, thanks! ;-) -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.lanostrafamiglia.it/ Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN) marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797 Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA! http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000 (cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)