Hi Bill,
May thanks for your reply.
I am running an openldap server with around 12,000 users. I was looking to
replace "dn:" with "myNewDN:". However, i have got the solution. I have
added the following to schema,
###
attributetype ( 1.3.6.1.4.1.XXXX.2.3.XXX NAME 'myNewDN'
DESC 'Test DN replacement'
SUP distinguishedName )
##
Cheers........JAMI.
On Mon, May 23, 2011 at 5:31 PM, Bill MacAllister <whm(a)stanford.edu> wrote:
>
>
> --On Monday, May 23, 2011 11:01:33 AM +1000 Mahmudur Rahman Jami <
> infojami(a)gmail.com> wrote:
>
> Hi,
>>
>> I want to create a new distinguishedName as follows (NOT as "dn:
>> cn=testUser,ou=testOU,dc=test,dc=local"),
>>
>> "myNewDN: cn=testUser,ou=testOU,dc=test,dc=local"
>>
>> I have got a ldif with similar definition to import. I googled and found
>> lot
>> of examples related to "attributetype" and "objectClass" only, not related
>> to this.
>> Any help will be highly appreciated.
>>
>> Thanks,
>> Jami
>>
>
> Assuming that the root of your directory is dc=test,dc=local then you
> need to created an entry for ou=testOU before you attempt to create
> the entry for cn=testUser.
>
> For example you might try:
>
> ldapadd -h somehost -b dc=test,dc=local<<EOF
> dn: ou=testOU,dc=test,dc=local
> objectClass: top
> objectClass: organizationalUnit
> ou: testOU
>
>
> dn: cn=testUser,ou=testOU,dc=test,dc=local
> objectclass: top
> objectclass: person
> cn: testUser
> sn: Smith
> EOF
>
> Of course, you will need to bind to the directory some credentials
> that will allow you to write to the directory.
>
> Bill
>
> --
>
> Bill MacAllister
> Infrastructure Delivery Group, Stanford University
>
>