ldapmodify

ldapmodify

The ldapmodify command is used to create, read, update, or delete entries in the directory. There is also an ldapadd command, which is used to create new directory entries. However, this command is equivalent to invoking ldapmodify with the “a (add) option. In addition, while it is possible to enter data using standard input, most users will perform actions based on data stored in a file (after all, if you make a mistake when typing and you have to cancel the data entry, all of the input will be lost).

If we want to create a new entry for Moppet Watters in the directory, the following data should be inserted into a file called newdata.txt :

 dn: cn=Moppet Watters, o=cassowary.net, c=US objectClass: person cn: Mopster Watters sn: Watters title: Mascot mail: moppet@cassowary.net uid: moppet 

In order to insert this data into the directory, the following command would be used:

 # ldapmodify a f newdata.txt 

To delete this entry from the directory, we would first insert the following data into delentry.txt :

 dn: cn=Moppet Watters, o=cassowary.net, c=US changetype=delete 

We could then delete the entry from the directory by using the following command:

 # ldapmodify f delentry.txt 
 
 
   


Sun Certified Solaris 9.0 System and Network Administrator
Sun Certified Solaris(tm) 9 System and Network Administrator All-in-One Exam Guide
ISBN: 0072225300
EAN: 2147483647
Year: 2003
Pages: 265
Authors: Paul Watters

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net