[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: suffix and sub suffix



TongEng Chiah wrote:
> 
> e.g in slapd.conf, i have
> 
> suffix="o=ABC,o=com,c=sg"
> rootdn="cn=root,o=ABC,o=com,c=sg"
> ...
> ...
> 
> suffix="ou=people,o=ABC,o=com,c=sg"
> rootdn="cn=root,ou=people,o=ABC,o=com,c=sg"
> ...
> ...
> 
> i realize i have problems adding entries to the sub
> suffix
> what i did was,
> 
> ldapmodify -r -x -W -D
> "cn=root,ou=people,o=ABC,o=com,c=sg" -f
> organisational.ldif
> where organisational.ldif contains
>    dn: ou=people,o=ABC,o=com,c=sg
>    changetype: add
>    objectlass: mOrganisationalUnit
> 
> The error i got was invalid credentials. when i change
> the ldapmodify command to
>    ldapmodify -r -x -W -D "cn=root,o=ABC,o=com,c=sg"
> -f organisational.ldif
> 
> the addition was successful. However it seems that the
> new entry is being added to the root suffix, not the
> sub suffix where i want it to be.
> 
> where have i gone wrong?

Database selection is based on subtree matching of the suffixes
on a first match basis, so you need to swap the database defintions,
otherwise suffix "o=ABC,o=com,c=sg" will get everything with
naming context "o=ABC,o=com,c=sg", including entries for naming 
context "ou=people,o=ABC,o=com,c=sg", which is a subcontext for
"o=ABC,o=com,c=sg"

Pierangelo.

-- 
Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
Politecnico di Milano                 |
mailto:pierangelo.masarati@polimi.it
via La Masa 34, 20156 Milano, Italy   |
http://www.aero.polimi.it/~masarati