Oracle® Internet Directory Administrator's Guide 10g (9.0.4) Part Number B12118-01 |
|
Directory Entries Administration, 3 of 5
This section points you to the command-line tools you can use in managing entries. It also provides several examples of entry management by using command-line tools. It contains these topics:
The following table lists each of the command-line tools, and tells you where to find syntax and usage notes for each one.
The following example shows an LDIF file, named entry.ldif
, for the entry for an employee named John:
dn: cn=john, c=us objectclass: top objectclass: person objectclass: organizationalPerson objectclass: inetOrgPerson cn: john cn;lang-fr:Jean cn;lang-en-us:John sn: Doe jpegPhoto: /photo/john.jpg
userpassword: welcome
This file contains the cn
, sn
, jpegPhoto
, and userpassword
attributes.
For the cn
attribute, it specifies two options: cn;lang-fr
, and cn;lang-en-us
. These options return the common name in either French or American English.
For the jpegPhoto
attribute, it specifies the path and file name of the corresponding JPEG image you want to include as an entry attribute.
The following example changes the password for a user named Audrey from welcome
to audreyspassword
. As in the previous example, the data for this user entry is in the entry.ldif
file. This file contains the following:
dn: cn=audrey,c=us changetype: modify replace: userpassword userpassword: audreyspassword
Issue this command to modify the file:
ldapmodify -p 389 -v -f entry.ldif
where -v specifies verbose mode.
This section provides examples of how to add and delete attribute options, and how to search for entries with attribute options.
Suppose that you were adding the Spanish equivalent of an entry for John, and that the data for this user entry is in the entry.ldif
file. This file contains the following:
dn: cn=john,c=us changeType: modify add: cn;lang-sp cn;lang-sp: Juan
Issue this command to modify the file:
ldapmodify -p 389 -v -f entry.ldif
The following example deletes the cn;lang-fr
attribute option from the entry for John. As in the previous example, assume that the data for this user entry is in the entry.ldif
file. This file contains the following:
dn: cn=john, c=us changetype: modify delete: cn;lang-fr cn;lang-fr: Jean
Issue this command to modify the file:
ldapmodify -p 389 -v -f entry.ldif
The following example retrieves entries with common name (cn
) attributes that have an option specifying a language code attribute option. This particular example retrieves entries in which the common names are in French and begin with the letter R.
ldapsearch -p 389 -h myhost -b "c=US" -s sub "cn;lang-fr=R*"
Suppose that, in the entry for John, no value is set for the cn;lang-it
language code attribute option. In this case, the following example fails:
ldapsearch -p 389 -h myhost -b "c=us" -s sub "cn;lang-it=Giovanni
|
![]() Copyright © 1999, 2003 Oracle Corporation. All Rights Reserved. |
|