Use the command-line tool ldapmodify to modify existing entries.
Then it deletes the entry uid=hricard,ou=sales,ou=people,dc=acme,dc=com.
Linux ldap query tool password#
This command authenticates user orcladmin to the directory myhost, using the password welcome. "uid=hricard,ou=sales,ou=people,dc=acme,dc=com" Syntax ldapdelete " entry DN "Įxample ldapdelete -h myhost -p 389 -D "cn=orcladmin" -w welcome \ ldapdelete opens a connection to a directory server and authenticates the user. Use the command-line tool ldapdelete to remove leaf entries from a directory. "LDIF" for details about LDIF file syntax The file might, for example, add the entry uid=jhay,cn=Human Resources,cn=acme,dc=com and its object classes and attributes. The command then opens the file jhay.ldif and adds its contents to the directory. Using this command, user orcladmin authenticates to the directory myhost, located at port 389. Syntax ldapadd Įxample ldapadd -h myhost -p 389 -D "cn=orcladmin" -w welcome -f jhay.ldif Then it opens the LDIF file supplied as an argument and adds, in succession, each entry in the file.
ldapadd opens a connection to the directory and authenticates the user. Use the command-line tool ldapadd to add entries to the directory. The example assumes anonymous authentication because authentication options are not specified. No attributes are returned because they have not been requested. The search filter "objectclass=*" means that values for all of the entry's object classes are returned. The scope of the search ( -s) is base, and the part of the directory searched is the base DN ( -b) designated. This command searches the directory server myhost, located at port 389. Syntax ldapsearch filter Įxample ldapsearch -h myhost -p 389 -s base -b "ou=people,dc=acme,dc=com" \ ldapsearch opens a connection to a directory, authenticates the user performing the operation, searches for the specified entry, and prints the result in a format that the user specifies. Use the command-line tool ldapsearch to search for specific entries in a directory. This command authenticates user orcladmin to the directory server myhost located at port 389, using the password welcome. Syntax ldapbind Įxample ldapbind -h myhost -p 389 -D "cn=orcladmin" -w welcome You can also use ldapbind to find out if the server is running. Use the command-line tool ldapbind to authenticate to a directory server. The section "Optional Arguments for Command-Line Tools", immediately following, defines the optional arguments used in the command descriptions and examples. This section introduces six popular command-line tools.
Linux ldap query tool update#
LDAP protocol operations are divided into three categories: authentication, interrogation, and update and control.