WJoeMoore
asked on
Use ldf script to change an entity from one OU to another
I manipulate entries in an LDAP (happens to be AD, but I am using standard ldf commands) programmatically.
I need to move a user from one OU to another. What is the syntax to do that? For example, I may have a user with the following DN:
CN=Moore\, William J, OU=Students, DC=jacks, DC=local
I need to change him to:
CN=Moore\, William J, OU=Stu_Applicants, DC=jacks, DC=local
I need to move a user from one OU to another. What is the syntax to do that? For example, I may have a user with the following DN:
CN=Moore\, William J, OU=Students, DC=jacks, DC=local
I need to change him to:
CN=Moore\, William J, OU=Stu_Applicants, DC=jacks, DC=local
http://www.msresource.net/paulw/moving_and_renaming_active_directory_objects_in_ldif_using_ldifde.html
ASKER
Thanks. This is the error I now get:
C:\d drive scripts>ldifde -i -f "Test 1235437_3.ldf" -s seacat -j "c:\d drive scripts"
Connecting to "seacat"
Logging in as current user using SSPI
Importing directory from file "Test 1235437_3.ldf"
Loading entries.
Add error on entry starting on line 3: Other
The server side error is: 0x2089 The operation could not be performed because the object's parent is either uninstantiated or deleted.
The extended server error is:
00002089: UpdErr: DSID-031B0CEC, problem 5012 (DIR_ERROR), data 5
From:
#
# ID: 1235437
dn: CN=Moore\, William J,OU=Students,DC=jacks,DC= local
changetype: modrdn
newrdn: CN=Charlie Parker
deleteOldRdn: 1
newSuperior: DC=jacks,DC=local,OU=Stu_A pplicants
Stu_Applicants currently has no 'normal' objects--just another OU. Should we create one manually just to make sure everything is initialized properly?
Thanks!
C:\d drive scripts>ldifde -i -f "Test 1235437_3.ldf" -s seacat -j "c:\d drive scripts"
Connecting to "seacat"
Logging in as current user using SSPI
Importing directory from file "Test 1235437_3.ldf"
Loading entries.
Add error on entry starting on line 3: Other
The server side error is: 0x2089 The operation could not be performed because the object's parent is either uninstantiated or deleted.
The extended server error is:
00002089: UpdErr: DSID-031B0CEC, problem 5012 (DIR_ERROR), data 5
From:
#
# ID: 1235437
dn: CN=Moore\, William J,OU=Students,DC=jacks,DC=
changetype: modrdn
newrdn: CN=Charlie Parker
deleteOldRdn: 1
newSuperior: DC=jacks,DC=local,OU=Stu_A
Stu_Applicants currently has no 'normal' objects--just another OU. Should we create one manually just to make sure everything is initialized properly?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You were absolutely correct on the 2nd part of your note. I switched the DC vs OU order and it worked fine. Thanks, and I'll give you full credit.
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for WJoeMoore's comment #a39780775
for the following reason:
Excellent understanding of question and error from first interpretation of answer.
Accepted answer: 0 points for WJoeMoore's comment #a39780775
for the following reason:
Excellent understanding of question and error from first interpretation of answer.
ASKER
Accidentally gave credit to my own comment. Too quick on the submit.