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

Re: Need help to create a new DN "myNewDN: cn=testUser, ou=testOU, dc=test, dc=local"

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 ( NAME 'myNewDN'
        DESC 'Test DN replacement'
        SUP distinguishedName )

On Mon, May 23, 2011 at 5:31 PM, Bill MacAllister <whm@stanford.edu> wrote:

--On Monday, May 23, 2011 11:01:33 AM +1000 Mahmudur Rahman Jami <infojami@gmail.com> wrote:


I want to create a new distinguishedName as follows (NOT as "dn:

"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.


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

Of course, you will need to bind to the directory some credentials
that will allow you to write to the directory.



Bill MacAllister
Infrastructure Delivery Group, Stanford University