1 |
--- 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 |
2 |
+++ 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 |
3 |
@@ -5,6 +5,7 @@ |
4 |
use strict; |
5 |
use Errno; |
6 |
use esmith::AccountsDB; |
7 |
+use esmith::util; |
8 |
|
9 |
# events: console-save, group-modify-samba, group-create, workgroup-update |
10 |
my $debug = "--debuglevel=1"; |
11 |
@@ -17,6 +18,8 @@ |
12 |
rename '/etc/samba/secrets.tdb','/etc/samba/secrets.'.time; |
13 |
rename '/var/cache/samba/gencache.tdb','/var/cache/samba/gencache.'.time; |
14 |
rename '/var/cache/samba/wins.dat','/var/cache/samba/wins.'.time; |
15 |
+ my $ldap_pw = esmith::util::LdapPassword(); |
16 |
+ system("/usr/bin/smbpasswd -w $ldap_pw"); |
17 |
$g = `/usr/bin/net getlocalsid`; |
18 |
$g =~ /SID.*is: (.+)/ or die "Could not get current sid\n"; |
19 |
} |