LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS

-f Forces command execution with warning override.
-v Displays verbose information.
-b Specifies the DN of the search/insert base which defines where ldapentry starts the
search/insert for the entry.
This option is optional if the LDAP_BASED variable is set. If specified, this option overwrites
the LDAP_BASEDN variable setting.
-h Specifies the host name of the LDAP directory. If not specified, ldapentry uses the local
host.
-p Specifies the TCP port number that the LDAP directory uses. The default is 389.
-D Specifies the distinguished name (DN) of an administrator who has the authority to add,
modify, or delete entries in the LDAP directory.
This option is optional if the LDAP_BINDDN environment variables has been set. If specified,
this option overwrites the LDAP_BINDDN variable setting.
service
The name of the service that will determine the type of entry to edit. Can be either passwd, group,
hosts, rpc, services, or networks.
value
The name of the entry recognized by the directory to be added, modified, or deleted.
dn
The full distinguished name of the entry to add, modify or delete.
For more detailed information, see the ldapentry(1) manpage.
9.4.1.2 Examples
The following configuration variables are defined in the user's configuration file as
~/.ux_ldap_admin_rc:
LDAP_BINDDN="cn=Jane Admin,ou=admins,dc=hp,dc=com" LDAP_HOST="myhost"
The command
ldapentry -a passwd UserA
will try to bind to the directory on server myhost as Jane Admin, prompt for the credentials,
and retrieve the service search descriptor from the profile LDIF file based on the service name
passwd. It will then open the template file with the editor defined by the environment variable
EDITOR and collect the input to pass it to ldapmodify to add the new entry.
The command
ldapentry -m "uid=UserA, ou=People, o=hp.com
will try to bind to the directory on server myhost as Jane Admin, prompt for the credentials,
and use the entered DN to retrieve the entry from the directory. It will then populate a template
with the retrieved information, and collect the changes to pass to ldapmodify for execution.
9.4 LDAP directory tools 355