[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Uid with '+' sign ?
Hi !
The ou i am trying to add this one to:
---
# domain.com, Domain, domain, nl
dn: ou=domain.com,ou=Domain,o=domain,c=nl
ou: domain.com
objectClass: top
objectClass: organizationalUnit
---
With perl-code:
---
sub LDAP_AddAddress ($) {
my ($s_mail) = @_;
$s_mail =~ /^(.*)@(.*)$/;
my $s_uid = $1;
my $s_domain = $2;
$s_uid =~ s/\+/\\+/g;
my $attrs = [
uid => "$s_uid",
objectClass => [ "qmailUser", "inetOrgPerson" ],
cn => "$s_uid",
sn => "unused",
mail => "$s_mail"
];
if (not (LDAP_TestDomain ($s_domain))) { # Check if 'domain'
container already exists.
LDAP_AddDomain ($s_domain);
}
my $dn = "uid=$s_uid,ou=$s_domain,$base";
my $ldap_result = $ldap_conn_admin_master->add ( $dn, attrs
=> $attrs );
if ($ldap_result->code != 0) {
print "$dn, failed with : ".$ldap_result->code.",
".$ldap_result->error_name."\n";
}
}
---
bye,
Chris
----- Original Message -----
From: "Peter Marschall" <peter@adpm.de>
To: "Christiaan den Besten" <chris@scorpion.nl>
Cc: <OpenLDAP-software@OpenLDAP.org>
Sent: Tuesday, March 22, 2005 6:17 PM
Subject: Re: Uid with '+' sign ?
Hi,
On Tuesday 22 March 2005 16:39, Christiaan den Besten wrote:
But now I get a LDAP_NAMING_VIOLATION.
---
uid=babette\+herman,ou=domain.com,ou=Domain,o=domain,c=nl, failed
with : 64, LDAP_NAMING_VIOLATION
---
I am using the default OpenLDAP schema's + qmail schema.
Can you provide the LDIF entry in question ?
Peter
--
Peter Marschall
eMail: peter@adpm.de