examples of add, change, remove entries to ldap using entries in an ldif file.

  • add an attribute

dn: cn=staff,ou=groups,dc=grox,dc=net
changetype: modify
add: member
member: uid=capella,ou=people,dc=grox,dc=net
-
  • add another attribute

dn: uid=capella,ou=people,dc=grox,dc=net
changetype: modify
add: userPassword
userPassword:: f8nSuVBafVNICEU6aE2tMuVH8Gs=
-
  • modify an attribute

dn: uid=capella,ou=people,dc=grox,dc=net
changetype: modify
replace: userPassword
userPassword:: c0NsWVBufVNWR6Z3LnBmMXfHZWs=
-
  • delete a dn

dn: uid=foo,ou=people,dc=grox,dc=net
changetype: delete
  • delete another dn

dn: uid=capella,ou=people,dc=grox,dc=net
changetype: delete
  • modify an attribute

dn: uid=capella,ou=people,dc=grox,dc=net
changetype: modify
replace: gidNumber
gidNumber: 50
-
  • add an attribute

dn: uid=capella,ou=people,dc=grox,dc=net
changetype: modify
add: loginShell
loginShell: /bin/sh
-
  • delete the same attribute

dn: uid=capella,ou=people,dc=grox,dc=net
changetype: modify
delete: loginShell
-
  • do multiple changes in a single transaction: add a member dn, delete a member dn

dn: cn=fplprod,ou=customergroup,dc=grox,dc=net
changetype: modify
delete: member
member: uid=capella,ou=people,dc=grox,dc=net
-
add: member
member: uid=foo,ou=people,dc=grox,dc=net
-