From: hickert Date: Tue, 11 Sep 2007 09:55:39 +0000 (+0000) Subject: Just call pwd reset when sambaccount is new X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=47765dd18c87c03426e66cd64e1943a1636aa98c;p=gosa.git Just call pwd reset when sambaccount is new git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7251 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index 5375aeeeb..8421e659d 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -1041,11 +1041,13 @@ class sambaAccount extends plugin /* Force password set, if this account doesn't have any samba passwords */ function password_change_needed() { - $ldap = $this->config->get_ldap_link(); - $ldap->cat($this->dn,array("sambaLMPassword","sambaNTPassword")); - $attrs = $ldap->fetch(); - if(!isset($attrs['sambaLMPassword']) || !isset($attrs['sambaNTPassword'])){ - return(TRUE); + if(!$this->initially_was_account && $this->is_account){ + $ldap = $this->config->get_ldap_link(); + $ldap->cat($this->dn,array("sambaLMPassword","sambaNTPassword")); + $attrs = $ldap->fetch(); + if(!isset($attrs['sambaLMPassword']) || !isset($attrs['sambaNTPassword'])){ + return(TRUE); + } } return(FALSE); }