1 |
vip-ire |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-samba-2.2.0/root/etc/e-smith/events/actions/create-machine-account mezzanine_patched_e-smith-samba-2.2.0/root/etc/e-smith/events/actions/create-machine-account |
2 |
|
|
--- e-smith-samba-2.2.0/root/etc/e-smith/events/actions/create-machine-account 2010-11-30 23:07:57.000000000 +0100 |
3 |
|
|
+++ mezzanine_patched_e-smith-samba-2.2.0/root/etc/e-smith/events/actions/create-machine-account 2010-11-30 23:07:41.000000000 +0100 |
4 |
|
|
@@ -121,6 +121,8 @@ |
5 |
|
|
"$machineName" |
6 |
|
|
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) account $machineName.\n" ); |
7 |
|
|
|
8 |
|
|
+warn "create-machine-account $machineName: Locking account\n"; |
9 |
|
|
+ |
10 |
|
|
system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod", |
11 |
|
|
"--userbase=ou=Computers,$base", |
12 |
|
|
"-o", |
13 |
|
|
@@ -128,14 +130,11 @@ |
14 |
|
|
"$machineName" |
15 |
|
|
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed locking (ldap) password for $machineName\n" ); |
16 |
|
|
|
17 |
|
|
-warn "create-machine-account $machineName: Locking account\n"; |
18 |
|
|
- |
19 |
|
|
-# warn "create-machine-account $machineName: Creating smbpasswd account\n"; |
20 |
|
|
-# |
21 |
|
|
-# Samba adds the smbpasswd account after it calls this script. |
22 |
|
|
-# However, we may want to do this if we call this script directly |
23 |
|
|
-# |
24 |
|
|
-# system("/usr/bin/smbpasswd", "-a", "-m", "$machineName") == 0 |
25 |
|
|
-# or warn "Could not create smb password entry for $machineName\n"; |
26 |
|
|
+if ($ldapauth ne 'enabled') |
27 |
|
|
+{ |
28 |
|
|
+ warn "create-machine-account $machineName: Creating smbpasswd account\n"; |
29 |
|
|
|
30 |
|
|
+ system("/usr/bin/smbpasswd", "-a", "-m", "$machineName") == 0 |
31 |
|
|
+ or warn "Could not create smb password entry for $machineName\n"; |
32 |
|
|
+} |
33 |
|
|
exit ($x); |