Providing Input from the Command-Line
21
•
Section 2.2.4, “Adding and Modifying Entries Using ldapmodify”
•
Section 2.2.5, “Deleting Entries Using ldapdelete”
•
Section 2.2.6, “Using Special Characters”
NOTE
You cannot modify your directory unless the appropriate access control rules have been
set. For information on creating access control rules for your directory, see
Chapter 6,
Managing Access Control
.
2.2.1. Providing Input from the Command-Line
When you provide input to the
ldapmodify
and
ldapdelete
1
utilities directly from the command-
line, you must use LDIF statements. For detailed information on LDIF statements, see
Section 2.4,
“LDIF Update Statements”
.
The
ldapmodify
and
ldapdelete
utilities read the statements that you enter in exactly the same
way as if they were read from a file. When all of the input has been entered, enter the character that
the shell recognizes as the end of file (EOF) escape sequence. The utility then begins operations
based on the supplied inputs.
While the EOF escape sequence depends on the type of machine, the EOF escape sequence almost
always control-D (
^D
).
For example, to input some LDIF update statements to
ldapmodify
, you would do the following:
ldapmodify -D
bindDN
-w
password
-h
hostname
dn: cn=Barry Nixon, ou=people, dc=example,dc=com
changetype: modify
delete: telephonenumber
-
add: manager
manager: cn=Harry Cruise, ou=people, dc=example,dc=com
^D
When adding an entry from the command line or from LDIF, make sure that an entry representing a
subtree is created before new entries are created under that branch. For example, to place an entry in
a
People
subtree, create an entry representing that subtree before creating entries within the subtree.
For example:
dn: dc=example,dc=com
dn: ou=People, dc=example,dc=com
...
People subtree entries.
...
dn: ou=Group, dc=example,dc=com
...
Group subtree entries.
...
The LDAP tools referenced in this guide are Mozilla LDAP, installed with Directory Server in the
/usr/lib/mozldap
directory
on Red Hat Enterprise Linux 5 (32-bit); directories for other platforms are listed in
Section 1.2, “LDAP Tool Locations”
. However,
Red Hat Enterprise Linux systems also include LDAP tools from OpenLDAP. It is possible to use the OpenLDAP commands as
shown in the examples, but you must use the
-x
argument to disable SASL and allow simple authentication.
Содержание DIRECTORY SERVER 8.0
Страница 18: ...xviii ...
Страница 29: ...Configuring the Directory Manager 11 6 Enter the new password and confirm it 7 Click Save ...
Страница 30: ...12 ...
Страница 112: ...94 ...
Страница 128: ...110 ...
Страница 190: ...Chapter 6 Managing Access Control 172 4 Click New to open the Access Control Editor ...
Страница 224: ...206 ...
Страница 324: ...306 ...
Страница 334: ...316 ...
Страница 358: ...340 ...
Страница 410: ...392 ...
Страница 420: ...402 ...
Страница 444: ...426 ...
Страница 454: ...436 ...
Страница 464: ...446 ...
Страница 484: ...466 ...
Страница 512: ...494 ...
Страница 522: ...504 ...