Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

modification

initial entry

imported Ldif

resulting entry

Comments

Reverse LDIF

add

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: apache
ou: acme corp

dn: cn=test, ou=system
changetype: modify
add: ou
ou: BigCompany inc.
-

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: apache
ou: acme corp
ou: BigCompany inc.

In this case, the ou value is simply added

dn: cn=test, ou=system
changetype: modify
delete: ou
ou: BigCompany inc.
-

add

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA

dn: cn=test, ou=system
changetype: modify
add: ou
ou: BigCompany inc.
-

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: BigCompany inc.

The ou attribute and its value has been created

dn: cn=test, ou=system
changetype: modify
delete: ou
ou: BigCompany inc.
-

add

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA

dn: cn=test, ou=system
changetype: modify
add: cn
cn: test
-

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA

Nothing is done.

no reverse, void operation

delete

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: apache
ou: acme corp

dn: cn=test, ou=system
changetype: modify
delete: ou
ou: acme corp
-

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: apache

The ou=acme corp value has been deleted

dn: cn=test, ou=system
changetype: modify
add: ou
ou: acme corp
-

delete

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: apache
ou: acme corp

dn: cn=test, ou=system
changetype: modify
delete: ou
-

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA

The ou attribute has been removed

dn: cn=test, ou=system
changetype: modify
add: ou
ou: apache
ou: acme corp
-

delete

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: apache
ou: acme corp

dn: cn=test, ou=system
changetype: modify
delete: ou
ou: apache
ou: acme corp
-

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA

As all the ou values have been removed,
the attribute itself is deleted

dn: cn=test, ou=system
changetype: modify
add: ou
ou: apache
ou: acme corp
-

replace

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: apache
ou: acme corp

dn: cn=test, ou=system
changetype: modify
replace: ou
ou: directory
ou: BigCompany inc.
-

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: directory
ou: BigCompany inc.

The ou attributes' values are replaced
by the new values.

dn: cn=test, ou=system
changetype: modify
replace: ou
ou: apache
ou: acme corp
-

replace

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA

dn: cn=test, ou=system
changetype: modify
replace: ou
ou: apache
ou: acme corp
-

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: apache
ou: acme corp

Create the ou attribute

dn: cn=test, ou=system
changetype: modify
replace: ou
-

replace

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA
ou: apache
ou: acme corp

dn: cn=test, ou=system
changetype: modify
replace: ou
-

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: joe doe
l: USA

Delete the ou attribute

dn: cn=test, ou=system
changetype: modify
replace: ou
ou: apache
ou: acme corp
-

ModifyDNRequest

This request is used to move entries or to rename entries or to move and rename entries. Its counterpart in a ldif file is a 'changetype: moddn' or a 'changetype: modrdn' operation (moddn or modrdn are synonymous).

...

case

orginal entry

target RDN

deleteoldrdn

forward ldif

resulting entry

reverse ldif

1.1

dn: cn=test,ou=system
objectclass: top
objectclass: person
cn: test
sn: This is a test

cn=joe

no

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=joe
deleteoldrdn: 0

dn: cn=joe, ou=system
objectclass: top
objectclass: person
cn: test
cn: joe
sn: This is a test

dn: cn=joe, ou=system
changetype: moddn
newrdn: cn=test
deleteoldrdn: 1

1.2

dn: cn=test,ou=system
objectclass: top
objectclass: person
cn: test
cn:small
sn: This is a test

cn=small

no

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=small
deleteoldrdn: 0

dn: cn=small, ou=system
objectclass: top
objectclass: person
cn: test
cn: small
sn: This is a test

dn: cn=small, ou=system
changetype: moddn
newrdn: cn=test
deleteoldrdn: 0

2.1

dn: cn=test,ou=system
objectclass: top
objectclass: person
cn: test
sn: This is a test

cn=joe

yes

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=joe
deleteoldrdn: 1

dn: cn=joe, ou=system
objectclass: top
objectclass: person
cn: joe
sn: This is a test

dn: cn=joe, ou=system
changetype: moddn
newrdn: cn=test
deleteoldrdn: 1

2.2

dn: cn=test,ou=system
objectclass: top
objectclass: person
cn: test
cn:small
sn: This is a test

cn=small

yes

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=small
deleteoldrdn: 1

dn: cn=small, ou=system
objectclass: top
objectclass: person
cn: joe
cn: small
sn: This is a test

dn: cn=joe, ou=system
changetype: moddn
newrdn: cn=test
deleteoldrdn: 0

3.1

dn: cn=small+cn=test,ou=system
objectclass: top
objectclass: person
cn: test
cn: small
sn: This is a test

cn=joe

no

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=joe
deleteoldrdn: 0

dn: cn=joe, ou=system
objectclass: top
objectclass: person
cn: test
cn: small
cn: joe
sn: This is a test

dn: cn=joe, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=small+cn=test

3.2

dn: cn=small+cn=test,ou=system
objectclass: top
objectclass: person
cn: test
cn: small
cn: big
sn: This is a test

cn=big

no

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=big
deleteoldrdn: 0

dn: cn=big, ou=system
objectclass: top
objectclass: person
cn: test
cn: small
cn: big
sn: This is a test

dn: cn=big, ou=system
changetype: moddn
deleteoldrdn: 0
newrdn: cn=small+cn=test

4.1

dn: cn=small+cn=test,ou=system
objectclass: top
objectclass: person
cn: test
cn: small
sn: This is a test

cn=joe

yes

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=joe
deleteoldrdn: 1

dn: cn=joe, ou=system
objectclass: top
objectclass: person
cn: joe
sn: This is a test

dn: cn=joe, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=small+cn=test

4.2

dn: cn=small+cn=test,ou=system
objectclass: top
objectclass: person
cn: test
cn: big
cn: small
sn: This is a test

cn=big

yes

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=big
deleteoldrdn: 1

dn: cn=big, ou=system
objectclass: top
objectclass: person
cn: big
sn: This is a test

dn: cn=big, ou=system
changetype: moddn
deleteoldrdn: 0
newrdn: cn=small+cn=test

5

cn=small+cn=test
objectclass: top
objectclass: person
cn: test
cn: small
sn: This is a test

cn=test

no

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=test
deleteoldrdn: 0

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
cn: small
sn: This is a test

dn: cn=test, ou=system
changetype: moddn
deleteoldrdn: 0
newrdn: cn=small+cn=test

6

cn=small+cn=test
objectclass: top
objectclass: person
cn: test
cn: small
sn: This is a test

cn=test

yes

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=test
deleteoldrdn: 1

dn: cn=test, ou=system
objectclass: top
objectclass: person
cn: test
sn: This is a test

dn: cn=test, ou=system
changetype: moddn
deleteoldrdn: 0
newrdn: cn=small+cn=test

7.1

cn=test
objectclass: top
objectclass: person
cn: test
cn: small
sn: This is a test

cn=joe+cn=plumber

no

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=joe+cn=plumber
deleteoldrdn: 0

dn: cn=joe+cn=plumber, ou=system
objectclass: top
objectclass: person
cn: test
cn: small
cn: joe
cn: plumber
sn: This is a test

dn: cn=joe+cn=plumber, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=test

7.2

cn=test
objectclass: top
objectclass: person
cn: test
cn: small
sn: This is a test

cn=joe+cn=small

no

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=joe+cn=small
deleteoldrdn: 0

dn: cn=joe+cn=small, ou=system
objectclass: top
objectclass: person
cn: test
cn: small
cn: joe
cn: plumber
sn: This is a test

dn: cn=joe+cn=small, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=test

and

dn: cn=test,ou=system
changetype: modify
add: cn
cn: small
-

8.1

cn=test
objectclass: top
objectclass: person
cn: test
cn: small
sn: This is a test

cn=joe+cn=plumber

yes

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=joe+cn=plumber
deleteoldrdn: 1

dn: cn=joe+cn=plumber, ou=system
objectclass: top
objectclass: person
cn: joe
cn: plumber
sn: This is a test

dn: cn=joe+cn=plumber, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=test

8.2

cn=test
objectclass: top
objectclass: person
cn: test
cn: small
sn: This is a test

cn=joe+cn=small

yes

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=joe+cn=small
deleteoldrdn: 1

dn: cn=joe+cn=small, ou=system
objectclass: top
objectclass: person
cn: small
cn: joe
cn: plumber
sn: This is a test

dn: cn=joe+cn=small, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=test

and

dn: cn=test,ou=system
changetype: modify
add: cn
cn: small
-

9.1

cn=test
objectclass: top
objectclass: person
cn: test
cn: big
sn: This is a test

cn=small+cn=test

no

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=small+cn=test
deleteoldrdn: 0

dn: cn=small+cn=test, ou=system
objectclass: top
objectclass: person
cn: small
cn: test
sn: This is a test

dn: cn=small+cn=test, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: test

9.2

cn=test
objectclass: top
objectclass: person
cn: test
cn: big
sn: This is a test

cn=big+cn=test+
cn=small

no

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=big+cn=test+
cn=small
deleteoldrdn: 0

dn: cn=big+cn=test+cn=small,
ou=system
objectclass: top
objectclass: person
cn: big
cn: test
cn: small
sn: This is a test

dn: cn=big+cn=test+cn=small,
ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: test

and

dn: cn=test, ou=system
changetype: modify
cn: add
cn: big
-

10.1

cn=test
objectclass: top
objectclass: person
cn: test
cn: big
sn: This is a test

cn=small+cn=test

yes

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=small+cn=test
deleteoldrdn: 1

dn: cn=small+cn=test, ou=system
objectclass: top
objectclass: person
cn: small
cn: test
sn: This is a test

dn: cn=small+cn=test,ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: test

10.2

cn=test
objectclass: top
objectclass: person
cn: test
cn: big
sn: This is a test

cn=big+cn=test+
cn=small

yes

dn: cn=test, ou=system
changetype: moddn
newrdn: cn=big+cn=test+
cn=small
deleteoldrdn: 1

dn: cn=big+cn=test+cn=small,
ou=system
objectclass: top
objectclass: person
cn: big
cn: test
cn: small
sn: This is a test

dn: cn=big+cn=test+cn=small,
ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: test

and

dn: cn=test, ou=system
changetype: modify
cn: add
cn: big
-

11.1

cn=small+cn=test
objectclass: top
objectclass: person
cn: test
cn: big
cn: small
sn: This is a test

cn=joe+cn=plumber

no

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=joe+cn=plumber
deleteoldrdn: 0

dn: cn=joe+cn=plumber, ou=system
objectclass: top
objectclass: person
cn: test
cn: big
cn: small
cn: joe
cn: plumber
sn: This is a test

dn: cn=joe+cn=plumber, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=small+cn=test

11.2

cn=small+cn=test
objectclass: top
objectclass: person
cn: test
cn: big cn: small
sn: This is a test

cn=joe+cn=big

no

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=joe+cn=big
deleteoldrdn: 0

dn: cn=joe+cn=big, ou=system
objectclass: top
objectclass: person
cn: test
cn: big
cn: small
cn: joe
sn: This is a test

dn: cn=joe+cn=big, ou=system
changetype: moddn
deleteoldrdn: 1newrdn: cn=small+cn=test

and

dn: cn=small+cn=test, ou=system
changetype: modify
cn: add
cn: big
-

12.1

cn=small+cn=test
objectclass: top
objectclass: person
cn: test
cn: big cn: small
sn: This is a test

cn=joe+cn=plumber

yes

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=joe+cn=plumber
deleteoldrdn: 1

dn: cn=joe+cn=plumber, ou=system
objectclass: top
objectclass: person
cn: big
cn: joe
cn: plumber
sn: This is a test

dn: cn=joe+cn=plumber, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=small+cn=test

12.2

cn=small+cn=test
objectclass: top
objectclass: person
cn: test
cn: big cn: small
sn: This is a test

cn=joe+cn=big

yes

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=joe+cn=big
deleteoldrdn: 1

dn: cn=joe+cn=big, ou=system
objectclass: top
objectclass: person
cn: big
cn: joe
sn: This is a test

dn: cn=joe+cn=big, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=small+cn=test

and

dn: cn=small+cn=test, ou=system
changetype: modify
cn: add
cn: big
-

13.1

cn=small+cn=test
objectclass: top
objectclass: person
cn: test
cn: big cn: small
sn: This is a test

cn=joe+cn=test

no

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=joe+cn=test
deleteoldrdn: 0

dn: cn=joe+cn=test, ou=system
objectclass: top
objectclass: person
cn: test
cn: small
cn: joe
sn: This is a test

dn: cn=joe+cn=test, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=small+cn=test

13.2

cn=small+cn=test
objectclass: top
objectclass: person
cn: test
cn: big cn: small
sn: This is a test

cn=big+cn=test

no

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=big+cn=test
deleteoldrdn: 0

dn: cn=big+cn=test, ou=system
objectclass: top
objectclass: person
cn: test
cn: small
cn: big
sn: This is a test

dn: cn=big+cn=test, ou=system
changetype: moddn
deleteoldrdn: 0
newrdn: cn=small+cn=test

14.1

cn=small+cn=test
objectclass: top
objectclass: person
cn: test
cn: big
cn: small
sn: This is a test

cn=joe+cn=test

yes

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=joe+cn=test
deleteoldrdn: 1

dn: cn=joe+cn=test, ou=system
objectclass: top
objectclass: person
cn: test
cn: big
cn: joe
sn: This is a test

dn: cn=joe+cn=test, ou=system
changetype: moddn
deleteoldrdn: 1
newrdn: cn=small+cn=test

14.2

cn=small+cn=test
objectclass: top
objectclass: person
cn: test
cn: big cn: small
sn: This is a test

cn=big+cn=test

yes

dn: cn=small+cn=test, ou=system
changetype: moddn
newrdn: cn=big+cn=test
deleteoldrdn: 1

dn: cn=big+cn=test, ou=system
objectclass: top
objectclass: person
cn: test
cn: big
sn: This is a test

dn: cn=big+cn=test, ou=system
changetype: moddn
deleteoldrdn: 0
newrdn: cn=small+cn=test

and

dn: cn=small+cn=test, ou=system
changetype: modify
cn: add
cn: big
-

The following picture represent all the different cases as a decision tree :Image Added