Skip Headers
Oracle® Fusion Middleware Man Page Reference for Oracle Directory Server Enterprise Edition
11g Release 1 (11.1.1.7.0)

Part Number E28967-01
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

dsmlmodify

add, modify, rename, move, or delete directory entries

Synopsis

install-path/dsrk/bin/dsmlmodify 
-h hostURL [options] -f filename

Description

The dsmlmodify command requests the addition, modification, rename, move, or deletion of entries stored in a directory accessible through Directory Services Markup Language (DSML) v2.

You must specify additions and modifications in the proper order, because the directory performs the updates in the order you request them. For example, to add entries to a subtree that does not yet exist, you must first update the base entry at the root of the subtree before adding entries under the base entry.

Options

The dsmlmodify command supports the following options:

-D user-identifier

Use the specified user identifier to authenticate.

The user identifier is the HTTP-layer identifier. The HTTP-layer identifier is typically mapped to an account in the directory. For example, if the uid value is used for HTTP-layer authentication, which maps in the directory to bind DN dn:uid=user-identifier,ou=people,dc=example,dc=com, then the dsmlmodify -D bjensen command would end up using permissions for directory operations based on the permissions for the account with entry DN uid=bjensen,ou=people,dc=example,dc=com. The user-identifier thus depends closely on the identity mapping between the HTTP layer and the LDAP layer.

If the user identifier and its password are omitted, the dsmlmodify command binds anonymously. The user identifier determines what entries and attributes the user can modify, according to the permissions for the user.

-f filename

Read the modifications from a file using DSML syntax.

The following content for example allows modification of Barbara Jensen's password:

<modifyRequest dn="uid=bjensen,ou=people,dc=example,dc=com">
<modification name="userpassword" operation="replace">
<value>newpassword</value>
</modification>
</modifyRequest>
-h hostURL

Use the specified URL to access the directory.

The host URL takes the form http://host:port where host represents the host on which the directory runs, and port is the port on which the directory listens for DSML requests.

-j filename

Read the bind password for simple HTTP authentication from the specified file.

-w

Prompt for the bind password for simple HTTP authentication.

-w password

Use the specified bind password for simple HTTP authentication.

Examples

Examples in this section use the following conventions:

Example 1   dsmlmodify: Adding an Entry

The following commands demonstrate adding an entry:

$ cat add.dsml
<addRequest dn="uid=ajohnson,ou=people,dc=example,dc=com">
   <attr name="objectclass"><value>top</value></attr>
   <attr name="objectclass"><value>person</value></attr>
   <attr name="objectclass"><value>organizationalPerson</value></attr>
   <attr name="objectclass"><value>inetOrgPerson</value></attr>
   <attr name="uid"><value>ajohnson</value></attr>
   <attr name="sn"><value>Johnson</value></attr>
   <attr name="cn"><value>Alice</value></attr>
   <attr name="mail"><value>alice.johnson@example.com</value></attr>
   <attr name="userPassword"><value>weakness</value></attr>
</addRequest>
$ dsmlmodify -h http://host:8080 -D hmiller -w - -f add.dsml

Enter bind password:
…

If you read Example.ldif, you see that hmiller's password is hillock.

Example 2   dsmlmodify: Modifying an Entry

The following commands demonstrate modifying an entry:

$ cat mod.dsml
<modifyRequest dn="uid=bjensen,ou=people,dc=example,dc=com">
<modification name="userpassword" operation="replace">
<value>newpassword</value>
</modification>
</modifyRequest>
$ dsmlmodify -h http://host:8080 -D bjensen -w - -f mod.dsml
Enter bind password:
…

If you read Example.ldif, you see that the bjensen's password is hifalutin.

Example 3   dsmlmodify: Deleting an Entry

The following commands demonstrate deleting an entry:

$ cat del.dsml
<delRequest dn="uid=ajohnson,ou=people,dc=example,dc=com" />
$ dsmlmodify -h http://host:8080 -D hmiller -w - -f del.dsml
Enter bind password:
…

If you read Example.ldif, you see that hmiller's password is hillock.

Example 4   dsmlmodify: Renaming an Entry

The following commands demonstrate renaming an entry:

$ cat rdn.dsml
<modDNRequest
  dn="uid=ajohnson,ou=people,dc=example,dc=com"
  newrdn="uid=aweiss"
  deleteoldrdn="true"
  newSuperior="ou=people,dc=example,dc=com"/>
$ dsmlmodify -h http://host:8080 -D hmiller -w - -f rdn.dsml
Enter bind password:
…

If you read Example.ldif, you see that hmiller's password is hillock.

Exit Status

Exit status values are returned as part of the response, including both the code and the description as described in the DSML v2 standard. Common exit status codes follow:

0

Successful completion; success.

1

Server encountered errors while processing the request; operationsError.

2

Server encountered errors while processing the request; protocolError.

10

Base DN belongs to an entry handled by neither server, and the referral URL identifies another server that handles the entry; referral.

16

Attribute to be modified does not exist; noSuchAttribute.

19

Attribute modification requested is not a proper modification. For example, a requested change to userpassword would result in a user password shorter than the minimum length allowed; constraintViolation.

20

Attribute to add already exists with specified value; attributeOrValueExists.

21

In response to a request to modify directory schema, the requested modification includes no object class or attribute type specification; invalidAttributeSyntax.

32

Base DN belongs to an entry handled by neither server, and no referral URL is available for the entry; noSuchObject.

50

Bind DN user does not have permission to read the entry from the directory; insufficientAccessRights.

53

Directory is read-only; unwillingToPerform.

65

Requested modification would cause the entry not to comply with the schema; objectClassViolation.

67

Requested modification would cause the entry to be missing attributes that are components of the entry DN; notAllowedOnRDN.

68

An entry already exists with the same DN as the entry to add; entryAlreadyExists.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE

Availability

Zip distribution only

Stability Level

Evolving


See Also

dsmlsearch(1), ldap_error(3LDAP)