Skip Headers

Oracle® Internet Directory Administrator's Guide
10g (9.0.4)

Part Number B12118-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to beginning of chapter Go to next page

Directory Entries Administration, 3 of 5


Managing Entries by Using Command-Line Tools

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:

Command-Line Tools for Managing Entries

The following table lists each of the command-line tools, and tells you where to find syntax and usage notes for each one.

Table 7-1  Command-Line Tools for Managing Entries
Tool Task(s) Syntax and Usage Notes

ldapadd

Add entries one at a time.

Add new configuration set entries.

Configure a server with an input file.

"ldapadd Syntax"

ldapaddmt

Add several entries concurrently by using this shared server tool.

"ldapaddmt Syntax"

ldapbind

Authenticate a user or client to a directory server.

Verify that you can connect a client to a server.

"ldapbind Syntax"

ldapcompare

Compare attribute values you specify with those in a directory entry.

"ldapcompare Syntax"

ldapdelete

Delete entries.

"ldapdelete Syntax"

ldapmoddn

Modify the DN or RDN of an entry.

Rename an entry or a subtree.

Move an entry or a subtree under a new parent.

"ldapmoddn Syntax"

ldapmodify

Create, update, and delete attribute data for an entry.

Modify configuration set entries.

Modify DN or RDN of an entry.

"ldapmodify Syntax"

ldapmodifymt

Modify several entries concurrently by using this shared server tool.

"ldapmodifymt Syntax"

ldapsearch

Search for directory entries.

"ldapsearch Syntax"

Example: Adding a User Entry by Using ldapadd

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.


Note:

When you add or modify an entry, the Oracle directory server does not verify the syntax of the attribute values in the entry.


Example: Modifying a User Entry by Using ldapmodify

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.


Note:

When you add or modify an entry, the Oracle directory server does not verify the syntax of the attribute values in the entry.


Managing Entries with Attribute Options by Using Command-Line Tools

This section provides examples of how to add and delete attribute options, and how to search for entries with attribute options.

Example: Adding an Attribute Option by Using ldapmodify

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

Example: Deleting an Attribute Option by Using ldapmodify

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

Example: Searching for Entries with Attribute Options by Using ldapsearch

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

See Also:

"Attribute Options"


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1999, 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index