On peut rajouter des attributs à un objet, modifier la valeur d'un attribut ou enlever une attribut, voire un objet :
dn: cn=Mathieu DECORE, dc=chez, dc=moi changetype: modify add: telephoneNumber telephoneNumber: 0123456789
Mettre à jour la base de données avec ldapmodify :
# ldapmodify -D "cn=admin, dc=chez, dc=moi" -w "<password>" -f /tmp/add modifying entry cn=Mathieu DECORE, dc=chez, dc=moi # ldapsearch -b 'dc=chez, dc=moi' '(objectclass=person)' telephonenumber cn=Mathieu DECORE, dc=chez, dc=moi telephonenumber=0123456789 #
dn: cn=Mathieu DECORE, dc=chez, dc=moi changetype: modify replace: telephoneNumber telephoneNumber: 9876543210
Mettre à jour la base de données avec ldapmodify :
# ldapmodify -D "cn=admin, dc=chez, dc=moi" -w "<password>" -f /tmp/modify modifying entry cn=Mathieu DECORE, dc=chez, dc=moi # ldapsearch -b 'dc=chez, dc=moi' '(objectclass=person)' telephonenumber cn=Mathieu DECORE, dc=chez, dc=moi telephonenumber=9876543210 #
dn: cn=Mathieu DECORE, dc=chez, dc=moi changetype: modify delete: telephoneNumber
Mettre à jour la base de données avec ldapmodify :
# ldapmodify -D "cn=admin, dc=chez, dc=moi" -w "<password>" -f /tmp/delete modifying entry cn=Mathieu DECORE, dc=chez, dc=moi # ldapsearch -b 'dc=chez, dc=moi' '(objectclass=person)' telephonenumber cn=Mathieu DECORE, dc=chez, dc=moi #