6.6 Modifying LDAP Entries

The modify option enables you to modify an existing object attributes and add or delete may attributes.

To add or to modify attributes, specify the element, an attribute value pair, and a DN. The main difference between command arguments in add, remove, and modify operations is that the add operation specifies the base DN of the directory element below which the new entry should be created with the --base option. The modify and remove operations identify the target element with the --DN option.

NOTE:If an operation is not finished successfully, posAdmin returns an error message.

Table 6-15 summarizes the posAdmin command options for modifying LDAP objects.

Table 6-15 posAdmin modify command options

Attribute

Type

Explanation

--DN

must

Distinguished name of the element to modify.

--object

must

Object with must or may attributes to be modified; for example, scWorkstation.

--attribute

must

Attribute; for example, scPosImageVersion.

--value

may

If a value is given the attribute is modified; otherwise, the attribute entry is deleted.

6.6.1 Adding and Removing an organizationalUnit Object Description

The following command adds a description to an organizationalUnit with the DN of ou=boston,o=mycorp,c=us:

posAdmin.pl --user cn=admin,o=mycorp,c=us --password secret 
--DN ou=boston,o=mycorp,c=us --modify --organizationalUnit 
--description ’my description of boston’

The following command removes the object description:

posAdmin.pl --user cn=admin,o=mycorp,c=us --password secret 
--DN ou=boston,o=mycorp,c=us --modify --organizationalUnit 
--description 

6.6.2 Defining a Specific Image for a scWorkstation Object

The following command defines a specific client image (--scPosImageDn) and version (--scPosImageVersion) for scWorkstation object cn=pos01,cn=Lab,ou=boston, o=mycorp,c=us (type the command all on one line):

posAdmin.pl --user cn=admin,o=mycorp,c=us --password secret 
--DN cn=pos01,cn=Lab,ou=boston,o=mycorp,c=us 
--modify --scWorkstation --scPosImageDn java 
--scPosImageVersion 1.1.3