select_role
Use the select_role command to retrieve a role in the currently selected zone from Active Directory. This command stores the role in memory, and makes it the currently selected role for subsequent ADEdit commands. The role remains selected until you select another role or zone, delete the role, or end the ADEdit session.
If you use ADEdit commands such as set_role_field to change settings for the selected role, you must save the selected role using the save_role command for your changes to take effect in Active Directory. If you select another role or end the ADEdit session before saving the currently selected role, your changes will be lost.
You can only use the select_role command to select roles if the currently selected zone is a classic4 or hierarchical zone. The command does not work for other types of zones.
Zone Type
Classic and hierarchical
Syntax
select_role role
Abbreviation
slr
Options
This command takes no options.
Arguments
This command takes the following arguments:
| Argument | Type | Description |
|---|---|---|
| role | string | Required. Specifies the name of the role to select. |
Return Value
This command returns nothing if it runs successfully.
Examples
select_role servicerep
This example retrieves the role definition named servicerep in the current zone and makes it as the currently selected role.
Related Commands
Before you use this command, you must have a currently selected zone stored in memory. The following commands enable you to view and select a role:
get_rolesreturns a Tcl list of roles in the current zone.list_roleslists tostdoutthe roles in the current zone.new_rolecreates a new role and stores it in memory.
After you have a role stored in memory, you can use the following commands to work with that role:
*add_command_to_roleadds a UNIX command right to the current role.
add_pamapp_to_roleadds a PAM application right to the current role.delete-roledeletes the selected role from Active Directory and from memory. *get_role_appsreturns a Tcl list of the PAM application rights associated with the current role.get_role_commandsreturns a Tcl list of the UNIX commands associated with the current role.get_role_fieldreads a field value from the current role.list_role_rightsreturns a list of all UNIX command and PAM application rights associated with the current role. *remove_command_from_roleremoves a UNIX command right from the current role.remove_pamapp_from_roleremoves a PAM application right from the current role.save_role savesthe selected role with its current settings to Active Directory.set_role_fieldsets a field value in the current role.