1 |
vip-ire |
1.1 |
diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-create-unix e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/group-create-unix |
2 |
|
|
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-create-unix 2010-12-29 19:10:34.000000000 +0100 |
3 |
|
|
+++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/group-create-unix 2011-03-03 20:38:15.000000000 +0100 |
4 |
|
|
@@ -115,7 +115,6 @@ |
5 |
|
|
"/usr/sbin/cpu", "-C/etc/cpu-system.conf", "useradd", |
6 |
|
|
"-u", $uid, |
7 |
|
|
"-g", $gid, |
8 |
|
|
- "-c", $description, |
9 |
|
|
"-d", |
10 |
|
|
"/home/e-smith", |
11 |
|
|
"-s", |
12 |
|
|
@@ -123,6 +122,17 @@ |
13 |
|
|
"$groupName" |
14 |
|
|
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) user $groupName.\n" ); |
15 |
|
|
|
16 |
|
|
+# Set the cn of the dummy user account (in ldap) |
17 |
|
|
+$tmpattr = File::Temp->new(); |
18 |
|
|
+print $tmpattr "cn: $description\n"; |
19 |
|
|
+$tmpattr->flush(); |
20 |
|
|
+system( |
21 |
|
|
+ "/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod", |
22 |
|
|
+ "-a", $tmpattr, |
23 |
|
|
+ "$groupName" |
24 |
|
|
+ ) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to update (ldap) user $groupName.\n" ); |
25 |
|
|
+undef $tmpattr; |
26 |
|
|
+ |
27 |
|
|
# Release lock if we have one |
28 |
|
|
$lock && esmith::lockfile::UnlockFile($lock); |
29 |
|
|
|
30 |
|
|
diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/group-modify-unix |
31 |
|
|
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix 2010-12-29 19:10:34.000000000 +0100 |
32 |
|
|
+++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/group-modify-unix 2011-03-03 20:29:22.000000000 +0100 |
33 |
|
|
@@ -78,10 +78,13 @@ |
34 |
|
|
or ( $x = 255, warn "Failed to modify (unix) group description for $groupName.\n" ); |
35 |
|
|
} |
36 |
|
|
|
37 |
|
|
- system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod", "-c", "$groupDesc", "$groupName") == 0 |
38 |
|
|
+ my $tmpattr = File::Temp->new(); |
39 |
|
|
+ print $tmpattr "cn: $groupDesc\n"; |
40 |
|
|
+ $tmpattr->flush(); |
41 |
|
|
+ system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod", "-a", "$tmpattr", "$groupName") == 0 |
42 |
|
|
or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to modify (ldap) group description for $groupName.\n" ); |
43 |
|
|
|
44 |
|
|
- my $tmpattr = File::Temp->new(); |
45 |
|
|
+ $tmpattr = File::Temp->new(); |
46 |
|
|
print $tmpattr "mail: $groupName\@$domain\n"; |
47 |
|
|
print $tmpattr "description: $groupDesc\n"; |
48 |
|
|
$tmpattr->flush(); |
49 |
|
|
diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/init-accounts e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/init-accounts |
50 |
|
|
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/init-accounts 2010-12-29 19:10:34.000000000 +0100 |
51 |
|
|
+++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/init-accounts 2011-03-07 15:46:22.000000000 +0100 |
52 |
|
|
@@ -54,7 +54,7 @@ |
53 |
|
|
{ |
54 |
|
|
if ($ldapauth eq 'enabled') |
55 |
|
|
{ |
56 |
|
|
- `/usr/sbin/cpu useradd -c 'e-smith administrator' -d /home/e-smith -G shared -M -s /sbin/e-smith/console admin`; |
57 |
|
|
+ `/usr/sbin/cpu useradd -f 'e-smith' -E 'administrator' -d /home/e-smith -G shared -M -s /sbin/e-smith/console admin`; |
58 |
|
|
`/usr/bin/gpasswd -a admin root`; |
59 |
|
|
} |
60 |
|
|
else |
61 |
|
|
@@ -103,7 +103,7 @@ |
62 |
|
|
$groups = join (',', sort (@groupList)); |
63 |
|
|
if ($ldapauth eq 'enabled') |
64 |
|
|
{ |
65 |
|
|
- $cmd = "/usr/sbin/cpu usermod -c 'e-smith administrator' -d /home/e-smith -G '$groups' -s /sbin/e-smith/console admin"; |
66 |
|
|
+ $cmd = "/usr/sbin/cpu usermod -f 'e-smith' -E 'administrator' -d /home/e-smith -G '$groups' -s /sbin/e-smith/console admin"; |
67 |
|
|
} |
68 |
|
|
else |
69 |
|
|
{ |
70 |
|
|
@@ -135,7 +135,7 @@ |
71 |
|
|
{ |
72 |
|
|
if ($ldapauth eq 'enabled') |
73 |
|
|
{ |
74 |
|
|
- `/usr/sbin/cpu useradd -c 'e-smith web server' -d /home/e-smith -G shared -M -s /bin/false www`; |
75 |
|
|
+ `/usr/sbin/cpu useradd -f 'e-smith' -E 'web server' -d /home/e-smith -G shared -M -s /bin/false www`; |
76 |
|
|
} |
77 |
|
|
else |
78 |
|
|
{ |
79 |
|
|
@@ -176,7 +176,7 @@ |
80 |
|
|
$groups = join (',', sort (@groupList)); |
81 |
|
|
if ($ldapauth eq 'enabled') |
82 |
|
|
{ |
83 |
|
|
- `/usr/sbin/cpu usermod -c 'e-smith web server' -d /home/e-smith -G '$groups' -s /bin/false www`; |
84 |
|
|
+ `/usr/sbin/cpu usermod -f 'e-smith' -E 'web server' -d /home/e-smith -G '$groups' -s /bin/false www`; |
85 |
|
|
} |
86 |
|
|
else |
87 |
|
|
{ |
88 |
|
|
diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/user-create-unix |
89 |
|
|
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix 2010-12-29 19:10:34.000000000 +0100 |
90 |
|
|
+++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/user-create-unix 2011-02-24 20:39:11.000000000 +0100 |
91 |
|
|
@@ -119,7 +119,6 @@ |
92 |
|
|
"/usr/sbin/cpu", "useradd", |
93 |
|
|
"-u", $uid, |
94 |
|
|
"-g", $gid, |
95 |
|
|
- "-c", "$first $last", |
96 |
|
|
"-f", "$first", |
97 |
|
|
"-E", "$last", |
98 |
|
|
"-e", "$userName\@$domain", |
99 |
|
|
diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/user-modify-unix |
100 |
|
|
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix 2010-12-29 19:10:34.000000000 +0100 |
101 |
|
|
+++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/user-modify-unix 2011-02-24 20:39:31.000000000 +0100 |
102 |
|
|
@@ -101,7 +101,7 @@ |
103 |
|
|
or ( $x = 255, warn "Failed to modify comment of (unix) account $userName.\n" ); |
104 |
|
|
} |
105 |
|
|
|
106 |
|
|
- system("/usr/sbin/cpu", "usermod", "-c", "$first $last", "-f", "$first", "-E", "$last", $userName) == 0 |
107 |
|
|
+ system("/usr/sbin/cpu", "usermod", "-f", "$first", "-E", "$last", $userName) == 0 |
108 |
|
|
or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to modify comment/name of (ldap) account $userName.\n" ); |
109 |
|
|
} |
110 |
|
|
|