1 |
slords |
1.1 |
diff -up e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin.locked-passwd e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin |
2 |
|
|
--- e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin.locked-passwd 2010-11-11 19:56:57.000000000 -0700 |
3 |
|
|
+++ e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin 2010-11-11 19:58:55.000000000 -0700 |
4 |
|
|
@@ -54,6 +54,7 @@ |
5 |
|
|
|
6 |
|
|
$ldif->{$dn}->{objectClass} = [ qw(posixAccount shadowAccount) ]; |
7 |
|
|
$ldif->{$dn}->{uid} = $key; |
8 |
|
|
+ $pwd = "!*" if $pwd eq '!!'; |
9 |
|
|
$ldif->{$dn}->{userPassword} = ($pwd =~ m/^\{/) ? $pwd : "\{CRYPT\}$pwd"; |
10 |
|
|
$ldif->{$dn}->{uidNumber} = $uid; |
11 |
|
|
$ldif->{$dn}->{gidNumber} = $gid; |
12 |
|
|
@@ -91,6 +92,7 @@ |
13 |
|
|
|
14 |
|
|
$ldif->{$dn}->{objectClass} = [ qw(account posixAccount shadowAccount) ]; |
15 |
|
|
@{$ldif->{$dn}}{'uid','userPassword','uidNumber','gidNumber','junk','junk','gecos','homeDirectory','loginShell'} = getpwnam($user); |
16 |
|
|
+ $ldif->{$dn}->{userPassword} = "!*" if $ldif->{$dn}->{userPassword} eq '!!'; |
17 |
|
|
$ldif->{$dn}->{userPassword} =~ s/^/{CRYPT}/ unless $ldif->{$dn}->{userPassword} =~ m/^\{/; |
18 |
|
|
$ldif->{$dn}->{cn} = $ldif->{$dn}->{gecos} || ''; |
19 |
|
|
} |