From b89cf450f4ea403fd2c1987722418dbe669448dc Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 11 Sep 2007 09:43:41 +0000 Subject: [PATCH] Added password update if samba passwords are missing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7250 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/samba/class_sambaAccount.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index 862d63108..5375aeeeb 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -1035,9 +1035,22 @@ class sambaAccount extends plugin } else { $this->handle_post_events("add", array("uid" => $this->uid)); } + } + + /* 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); + } + return(FALSE); } + function adapt_from_template($dn) { plugin::adapt_from_template($dn); -- 2.30.2