1 |
vip-ire |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update |
2 |
|
|
--- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update 2010-09-23 19:44:01.000000000 +0200 |
3 |
|
|
+++ mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update 2010-09-23 19:43:59.000000000 +0200 |
4 |
|
|
@@ -80,8 +80,21 @@ |
5 |
|
|
#------------------------------------------------------------ |
6 |
|
|
my $pw = esmith::util::LdapPassword(); |
7 |
|
|
my %passwd; |
8 |
|
|
- |
9 |
|
|
-while(my ($key,$pwd) = getpwent()) { $passwd{$key} = "{CRYPT}$pwd"; } |
10 |
|
|
+my %uid; |
11 |
|
|
+my %gid; |
12 |
|
|
+my %home; |
13 |
|
|
+my %shell; |
14 |
|
|
+ |
15 |
|
|
+while(my ($key,$pwd,$uid,$gid, |
16 |
|
|
+ undef,undef,undef, |
17 |
|
|
+ $home,$shell) = getpwent()) { |
18 |
|
|
+ |
19 |
|
|
+ $passwd{$key} = "{CRYPT}$pwd"; |
20 |
|
|
+ $uid{$key} = $uid; |
21 |
|
|
+ $gid{$key} = $gid; |
22 |
|
|
+ $home{$key} = $home; |
23 |
|
|
+ $shell{$key} = $shell; |
24 |
|
|
+} |
25 |
|
|
endpwent(); |
26 |
|
|
|
27 |
|
|
#------------------------------------------------------------ |
28 |
|
|
@@ -129,7 +142,12 @@ |
29 |
|
|
utf8::upgrade($street); |
30 |
|
|
my $password = $passwd{$key} || ''; |
31 |
|
|
utf8::upgrade($password); |
32 |
|
|
- push @attrs, (objectClass => 'inetOrgPerson'); |
33 |
|
|
+ my $uid = $uid{$key} || ''; |
34 |
|
|
+ my $gid = $gid{$key} || ''; |
35 |
|
|
+ my $home = $home{$key} || ''; |
36 |
|
|
+ my $shell = $shell{$key} || ''; |
37 |
|
|
+ |
38 |
|
|
+ push @attrs, (objectClass => ['inetOrgPerson', 'posixAccount']); |
39 |
|
|
push @attrs, (uid => $key); |
40 |
|
|
|
41 |
|
|
push @attrs, (cn => $name) unless ($name =~ /^\s*$/); |
42 |
|
|
@@ -142,6 +160,10 @@ |
43 |
|
|
push @attrs, (l => $city) unless $city =~ /^\s*$/; |
44 |
|
|
push @attrs, (street => $street) unless $street =~ /^\s*$/; |
45 |
|
|
push @attrs, (userPassword => $password) unless $password =~ /^\s*$/; |
46 |
|
|
+ push @attrs, (uidNumber => $uid) unless $uid =~ /^\s*$/; |
47 |
|
|
+ push @attrs, (gidNumber => $gid) unless $gid =~ /^\s*$/; |
48 |
|
|
+ push @attrs, (homeDirectory => $home) unless $home =~ /^\s*$/; |
49 |
|
|
+ push @attrs, (loginShell => $shell) unless $shell =~ /^\s*$/; |
50 |
|
|
} |
51 |
|
|
elsif ($type eq 'group') |
52 |
|
|
{ |
53 |
|
|
diff -Nur -x '*.orig' -x '*.rej' e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/50users mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/50users |
54 |
|
|
--- e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/50users 2010-09-23 19:44:01.000000000 +0200 |
55 |
|
|
+++ mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/50users 2010-09-23 19:25:45.000000000 +0200 |
56 |
|
|
@@ -12,11 +12,16 @@ |
57 |
|
|
my $dept = $user->prop('Dept'); |
58 |
|
|
my $city = $user->prop('City'); |
59 |
|
|
my $street = $user->prop('Street'); |
60 |
|
|
+ my $uid = $uid{$key}; |
61 |
|
|
+ my $gid = $gid{$key}; |
62 |
|
|
my $password = $passwd{$key}; |
63 |
|
|
+ my $home = $home{$key}; |
64 |
|
|
+ my $shell = $shell{$key}; |
65 |
|
|
|
66 |
|
|
$OUT .= "\n"; |
67 |
|
|
$OUT .= utf8("dn: uid=$key,ou=Users,$ldapBase\n"); |
68 |
|
|
$OUT .= utf8("objectClass: inetOrgPerson\n"); |
69 |
|
|
+ $OUT .= utf8("objectClass: posixAccount\n"); |
70 |
|
|
$OUT .= utf8("uid: $key\n"); |
71 |
|
|
$OUT .= utf8("cn: $name\n") if $name; |
72 |
|
|
$OUT .= utf8("givenName: $first\n") if $first; |
73 |
|
|
@@ -28,5 +33,9 @@ |
74 |
|
|
$OUT .= utf8("l: $city\n") if $city; |
75 |
|
|
$OUT .= utf8("street: $street\n") if $street; |
76 |
|
|
$OUT .= utf8("userPassword: $password\n") if $password; |
77 |
|
|
+ $OUT .= utf8("uidNumber: $uid\n") if $uid; |
78 |
|
|
+ $OUT .= utf8("gidNumber: $gid\n") if $gid; |
79 |
|
|
+ $OUT .= utf8("homeDirectory: $home\n") if $home; |
80 |
|
|
+ $OUT .= utf8("loginShell: $shell\n") if $shell; |
81 |
|
|
} |
82 |
|
|
} |
83 |
|
|
diff -Nur -x '*.orig' -x '*.rej' e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin |
84 |
|
|
--- e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin 2010-09-23 19:44:01.000000000 +0200 |
85 |
|
|
+++ mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin 2010-09-23 19:41:51.000000000 +0200 |
86 |
|
|
@@ -12,7 +12,20 @@ |
87 |
|
|
} |
88 |
|
|
|
89 |
|
|
%passwd = (); |
90 |
|
|
- while(my ($key,$pwd) = getpwent()) { $passwd{$key} = "{CRYPT}$pwd"; } |
91 |
|
|
+ %uid = (); |
92 |
|
|
+ %gid = (); |
93 |
|
|
+ %home = (); |
94 |
|
|
+ %shell = (); |
95 |
|
|
+ while(my ($key,$pwd,$uid,$gid, |
96 |
|
|
+ undef,undef,undef, |
97 |
|
|
+ $dir,$shell) = getpwent()) { |
98 |
|
|
+ |
99 |
|
|
+ $passwd{$key} = "{CRYPT}$pwd"; |
100 |
|
|
+ $uid{$key} = $uid; |
101 |
|
|
+ $gid{$key} = $gid; |
102 |
|
|
+ $home{$key} = $dir; |
103 |
|
|
+ $shell{$key} = $shell; |
104 |
|
|
+ } |
105 |
|
|
endpwent(); |
106 |
|
|
|
107 |
|
|
$OUT = ""; |