Use ldapadd(1) to add an entry to the directory. ldapadd opens a connection to the LDAP directory server, binds to the directory server, and performs a sequence of LDAP add operations on the directory.
Bind as the directory manager (password “enigma”) and add an entries for Penny Gold and Amy Lamb.
% ldapadd -D "cn=Manager, o=Ultra Keyboards Inc., \ c=US" -w enigma < addfile |
The contents of addfile are:
dn: cn=Penny Gold, o=Ultra Keyboards Inc., c=US changetype: add objectclass: top objectclass: person objectclass: inetOrgPerson cn: Penny Gold sn: Gold mail: pgold@ultra.com dn: cn=Amy Lamb, o=Ultra Keyboards Inc., c=US changetype: add objectclass: top objectclass: person objectclass: inetOrgPerson cn: Amy Lamb sn: Lamb mail: alamb@ultra.com |