← 返回命令列表

Linux command

ldapmodify 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Modify entry from LDIF

ldapmodify -x -D "[cn=admin,dc=example,dc=com]" -W -f [changes.ldif]

Add entry (like ldapadd)

ldapmodify -a -x -D "[binddn]" -W -f [entry.ldif]

Interactive mode

ldapmodify -x -D "[binddn]" -W

Delete attribute

ldapmodify -x -D "[binddn]" -W -f [delete.ldif]

Using LDAPS

ldapmodify -x -H ldaps://[server] -D "[binddn]" -W -f [file.ldif]

说明

ldapmodify modifies LDAP directory entries. It supports adding, replacing, and deleting attributes based on LDIF input.

参数

-x
Simple authentication.
-D _binddn_
Bind DN.
-W
Prompt for password.
-w _password_
Password (insecure).
-H _URI_
LDAP server URI.
-f _file_
LDIF file with modifications.
-a
Add mode (like ldapadd).
-c
Continue on errors.
-M
Enable manage DSA IT control.
-n
Dry run.

FAQ

What is the ldapmodify command used for?

ldapmodify modifies LDAP directory entries. It supports adding, replacing, and deleting attributes based on LDIF input.

How do I run a basic ldapmodify example?

Run `ldapmodify -x -D "[cn=admin,dc=example,dc=com]" -W -f [changes.ldif]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -x do in ldapmodify?

Simple authentication.