1 |
diff -up e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-create-unix.add-extra-ldap e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-create-unix |
diff -up e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-create-unix.add-extra-ldap e-smith-base-5.2.0/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.add-extra-ldap 2010-11-04 18:21:40.000000000 -0600 |
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-create-unix.add-extra-ldap 2010-11-04 19:17:44.000000000 -0600 |
3 |
+++ e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-create-unix 2010-11-04 18:22:55.000000000 -0600 |
+++ e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-create-unix 2010-11-04 19:17:55.000000000 -0600 |
4 |
@@ -27,6 +27,7 @@ use strict; |
@@ -27,6 +27,7 @@ use strict; |
5 |
use Errno; |
use Errno; |
6 |
use esmith::ConfigDB; |
use esmith::ConfigDB; |
39 |
# Now create the dummy user account (in ldap) |
# Now create the dummy user account (in ldap) |
40 |
system( |
system( |
41 |
diff -up e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix.add-extra-ldap e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix |
diff -up e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix.add-extra-ldap e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix |
42 |
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix.add-extra-ldap 2010-11-04 18:21:40.000000000 -0600 |
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix.add-extra-ldap 2010-11-04 19:17:44.000000000 -0600 |
43 |
+++ e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix 2010-11-04 18:23:00.000000000 -0600 |
+++ e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix 2010-11-04 19:17:55.000000000 -0600 |
44 |
@@ -27,6 +27,7 @@ use strict; |
@@ -27,6 +27,7 @@ use strict; |
45 |
use Errno; |
use Errno; |
46 |
use esmith::ConfigDB; |
use esmith::ConfigDB; |
79 |
my @oldMembers = split (/\s+/, $members); |
my @oldMembers = split (/\s+/, $members); |
80 |
my @newMembers = split (/,/, $properties {'Members'}); |
my @newMembers = split (/,/, $properties {'Members'}); |
81 |
diff -up e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix.add-extra-ldap e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix |
diff -up e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix.add-extra-ldap e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix |
82 |
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix.add-extra-ldap 2010-11-04 18:21:40.000000000 -0600 |
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix.add-extra-ldap 2010-11-04 19:17:44.000000000 -0600 |
83 |
+++ e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix 2010-11-04 18:23:40.000000000 -0600 |
+++ e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix 2010-11-04 19:35:47.000000000 -0600 |
84 |
@@ -27,6 +27,7 @@ use strict; |
@@ -27,6 +27,7 @@ use strict; |
85 |
use Errno; |
use Errno; |
86 |
use esmith::ConfigDB; |
use esmith::ConfigDB; |
115 |
if ($ldapauth ne 'enabled') |
if ($ldapauth ne 'enabled') |
116 |
{ |
{ |
117 |
# Create the user's unique group first |
# Create the user's unique group first |
118 |
@@ -99,6 +108,13 @@ system( |
@@ -99,6 +108,15 @@ system( |
119 |
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) group $userName.\n" ); |
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) group $userName.\n" ); |
120 |
|
|
121 |
# Now create the user account (in ldap) |
# Now create the user account (in ldap) |
122 |
|
+my @attrs; |
123 |
+my $tmpattr = File::Temp->new(); |
+my $tmpattr = File::Temp->new(); |
124 |
+print $tmpattr "telephoneNumber: $phone\n"; |
+print $tmpattr "telephoneNumber: $phone\n" if $phone; |
125 |
+print $tmpattr "o: $company\n"; |
+print $tmpattr "o: $company\n" if $company; |
126 |
+print $tmpattr "ou: $dept\n"; |
+print $tmpattr "ou: $dept\n" if $dept; |
127 |
+print $tmpattr "l: $city\n"; |
+print $tmpattr "l: $city\n" if $city; |
128 |
+print $tmpattr "street: $street\n"; |
+print $tmpattr "street: $street\n" if $street; |
129 |
+$tmpattr->flush(); |
+$tmpattr->flush(); |
130 |
|
+push @attrs, ('-a', "$tmpattr") if -s $tmpattr; |
131 |
system( |
system( |
132 |
"/usr/sbin/cpu", "useradd", |
"/usr/sbin/cpu", "useradd", |
133 |
"-u", $uid, |
"-u", $uid, |
134 |
@@ -106,6 +122,8 @@ system( |
@@ -106,6 +124,8 @@ system( |
135 |
"-c", "$first $last", |
"-c", "$first $last", |
136 |
"-f", "$first", |
"-f", "$first", |
137 |
"-E", "$last", |
"-E", "$last", |
138 |
+ "-e", "$userName\@$domain", |
+ "-e", "$userName\@$domain", |
139 |
+ "-a", "$tmpattr", |
+ @attrs, |
140 |
"-d", "/home/e-smith/files/users/$userName", |
"-d", "/home/e-smith/files/users/$userName", |
141 |
"-G", "shared", |
"-G", "shared", |
142 |
"-m", |
"-m", |
143 |
@@ -113,6 +131,7 @@ system( |
@@ -113,6 +133,7 @@ system( |
144 |
"-s", "$shell", |
"-s", "$shell", |
145 |
$userName |
$userName |
146 |
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) account $userName.\n" ); |
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) account $userName.\n" ); |
149 |
|
|
150 |
# Release lock if we have one |
# Release lock if we have one |
151 |
diff -up e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix.add-extra-ldap e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix |
diff -up e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix.add-extra-ldap e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix |
152 |
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix.add-extra-ldap 2010-11-04 18:21:40.000000000 -0600 |
--- e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix.add-extra-ldap 2010-11-04 19:17:44.000000000 -0600 |
153 |
+++ e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix 2010-11-04 18:24:58.000000000 -0600 |
+++ e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix 2010-11-04 19:17:55.000000000 -0600 |
154 |
@@ -22,12 +22,17 @@ use strict; |
@@ -22,12 +22,17 @@ use strict; |
155 |
use Errno; |
use Errno; |
156 |
use esmith::AccountsDB; |
use esmith::AccountsDB; |