--- e-smith-samba+ldap-2.2.0/root/etc/e-smith/events/actions/update-domain-group-maps.root_passwd_for_samba 2008-10-21 18:34:14.000000000 +0200 +++ e-smith-samba+ldap-2.2.0/root/etc/e-smith/events/actions/update-domain-group-maps 2008-10-21 18:37:03.000000000 +0200 @@ -5,6 +5,7 @@ use strict; use Errno; use esmith::AccountsDB; +use esmith::util; # events: console-save, group-modify-samba, group-create, workgroup-update my $debug = "--debuglevel=1"; @@ -17,6 +18,8 @@ rename '/etc/samba/secrets.tdb','/etc/samba/secrets.'.time; rename '/var/cache/samba/gencache.tdb','/var/cache/samba/gencache.'.time; rename '/var/cache/samba/wins.dat','/var/cache/samba/wins.'.time; + my $ldap_pw = esmith::util::LdapPassword(); + system("/usr/bin/smbpasswd -w $ldap_pw"); $g = `/usr/bin/net getlocalsid`; $g =~ /SID.*is: (.+)/ or die "Could not get current sid\n"; }