From: janw Date: Wed, 29 Nov 2006 10:18:55 +0000 (+0000) Subject: Only convert samba user (not machines). X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=af970e54d59538b45af58957d2d8eb45c558bb87;p=gosa.git Only convert samba user (not machines). git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5245 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/contrib/fix_munged.php b/contrib/fix_munged.php index 754a03666..405d345af 100755 --- a/contrib/fix_munged.php +++ b/contrib/fix_munged.php @@ -43,7 +43,7 @@ $ldap_password= "tester"; /* Internal Settings */ $ldap_protocol= "3"; -$filter= "(objectClass=sambaSamAccount)"; +$filter= "(&(objectClass=sambaSamAccount)(sambaMungedDial=*))"; $attributes= array("dn","sambaMungedDial"); print("This script will try to convert all ldap entries that have the sambaMungedDial-Attribute set, into the new \n". @@ -83,11 +83,11 @@ for($i=0; $i<$count; $i++) { $mungedDial = new sambaMungedDial(); $mungedDial->load($entry['sambamungeddial'][0]); $modify['sambaMungedDial'][0]= $mungedDial->getMunged(); - #if(ldap_modify($connection,$entry['dn'],$modify)) { - # print("done.\n"); - #} else { - # print("failed.\n"); - #} + if(ldap_modify($connection,$entry['dn'],$modify)) { + print("done.\n"); + } else { + print("failed.\n"); + } } ldap_close($connection);