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

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





--On Monday, May 23, 2011 11:01:33 AM +1000 Mahmudur Rahman Jami <infojami@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