Make example user a person

This commit is contained in:
Jamie Cameron
2008-03-01 18:59:12 +00:00
parent 9bd37ba28f
commit e76965e9ce
2 changed files with 4 additions and 13 deletions

View File

@@ -59,12 +59,13 @@ if ($ok && $in{'example'}) {
# User
$edn = "uid=example, ".$dn;
@attrs = ( "cn", "Example user",
"sn", "Example user",
"uid", "example",
"uidNumber", 9999,
"gidNumber", 9999,
"loginShell", "/bin/sh",
"homeDirectory", "/home/example",
"objectClass", [ "posixAccount" ],
"objectClass", [ "posixAccount", "person" ],
"userPassword", "*LK*" );
if ($in{'example'} == 2) {
# With mail

View File

@@ -486,12 +486,7 @@ sub store_ldap_access
{
local ($a, $p) = @_;
local @v = ( 'to' );
if ($p->{'what'} =~ /^\S+$/) {
push(@v, $p->{'what'});
}
else {
push(@v, "\"$p->{'what'}\"");
}
push(@v, $p->{'what'});
if ($p->{'filter'}) {
push(@v, "filter=$p->{'filter'}");
}
@@ -500,12 +495,7 @@ if ($p->{'attrs'}) {
}
foreach my $b (@{$p->{'by'}}) {
push(@v, "by");
if ($b->{'who'} =~ /^\S+$/) {
push(@v, $b->{'who'});
}
else {
push(@v, "\"$b->{'who'}\"");
}
push(@v, $b->{'who'});
push(@v, $b->{'access'});
push(@v, @{$b->{'control'}});
}