rename_object
Use the rename_object
command to rename the selected object. You can replace only the first relative distinguished name in the selected object. You do not need to save the object after you change the name.
Zone type
Not applicable
Syntax
rename_object name
Abbreviation
rno
Options
This command takes no options.
Arguments
This command takes the following argument:
Argument | Type | Description |
name |
string |
Required. Specifies the replacement relative distinguished name for the first relative distinguished name in the selected object. |
Return value
This command returns nothing if it runs successfully.
Examples
The following example selects the user object Lois Lane
and changes her name to LoisLane
:
select_object “cn=Lois Lane,cn=Users,dc=demo,dc=test” rename_object LoisLane
The following example selects the organizational unit UnixServers
an renames it to UNIX Servers
:
select_object “ou=UnixServers,ou=Acme,dc=demo,dc=test” rno “UNIX Servers”
In both examples, quotes are required to preserve spaces in object names.
Related commands
The following command performs actions related to this command:
- select_object selects the object you want to rename.