[Samba-it] Samba PDC non aggiorna campo sambaPwdMustChange
Maurizio Marini
maumar at datalogica.com
Tue Nov 24 00:40:41 MST 2009
On Tuesday 17 November 2009, Silvio Fabi - NBS srl wrote:
> Ho provato a lasciare solo 'ldap passwd sync = yes', ma niente il campo
> 'sambaPwdMustChange' non si aggiorna!!
> Dalla documentazione ufficiale ho visto che settando 'ldap passwd sync =
> yes' vengono aggiornati i seguenti campi:
>
> sambaLMPassword:
> sambaNTPassword:
> sambaPwdLastSet:
> userPassword:
Io sono nelle tue stesse condizioni, da quando ho settato la policy dei 90
giorni con il cambio password ctrl-alt-canc non si aggiorna piu' il campo
sambaPwdMustChange, io leggo direttamente in ldap con una scriptina php e
ottengo:
sambaPwdLastSet: 20091124081513
sambaPwdMustChange: 20100221133722
passwordexpirationtime: 20100222071513Z
mentre pdbedit -L -v -u prova mi da:
Password last set: mar, 24 nov 2009 08:15:13 CET
Password can change: mar, 24 nov 2009 08:15:13 CET
Password must change: lun, 22 feb 2010 08:15:13 CET
Sicuramente mi sbaglio (come sempre ;) ), pero' mi viene in mente che settando
la policy a 90 giorni, il campo sambaPwdMustChange non si aggiorni perche'
samba applica di suo la policy e aggiunge 90 a sambaPwdLastSet
tanto e' vero che andando a retrodatare sambaPwdLastSet (sempre con delle
infime script php)
# php set_expire_date.php prova -20
read sambaPwdLastSet: 20091124081513
read sambaPwdMustChange: 20100221133722
read passwordexpirationtime: 20100222071513Z
setting sambaPwdLastSet: 20090806093206
setting sambaPwdMustChange: 20091104083206
setting passwordexpirationtime: 20091104083206Z
sambaPwdLastSet: 1249543926
sambaPwdMustChange: 1257319926
passwordexpirationtime: 20091104083206Z
1
array(3) {
["sambaPwdLastSet"]=>
string(10) "1249543926"
["sambaPwdMustChange"]=>
string(10) "1257319926"
["passwordexpirationtime"]=>
string(15) "20091104083206Z"
}
dove array(3) e' un bieco var_dump dell'array che passo a ldap_mod_replace
$result = ldap_mod_replace($this->ldapConn, $user_ldaprdn, $entry );
echo $result . "\n";
var_dump($entry);
adesso lancio di nuovo pdbedit -L -v -u prova
Password last set: gio, 06 ago 2009 09:32:06 CEST
Password can change: gio, 06 ago 2009 09:32:06 CEST
Password must change: mer, 04 nov 2009 08:32:06 CET
adesso cambio l apassword con alt-control-canc e rilancio pdbedit
Password last set: mar, 24 nov 2009 08:36:03 CET
Password can change: mar, 24 nov 2009 08:36:03 CET
Password must change: lun, 22 feb 2010 08:36:03 CET
adesso guardo con il php che ci sta nei campi di ldap:
php get_expire_date.php prova2
read sambaPwdLastSet: 20091124083603
read sambaPwdMustChange: 20091104083206
read passwordexpirationtime: 20100222073603Z
visto?
m.
More information about the samba-it
mailing list