set_rs_env_for_role
Use the set_rs_env_for_role command to assign a restricted shell environment to the currently selected role that is stored in memory. You should note that a role can only have one restricted shell environment assigned to it. If you assign a new restricted shell environment to a role, the current restricted shell environment—if one exists—will be removed. In addition, a role cannot be defined with both privileged commands and a restricted shell environment at the same time. If you assign a restricted shell environment to the currently selected role, all privileged commands previously defined for the role—if they exist—will be removed from the role.
The set_rs_env_for_role command does not modify the data stored in Active Directory for the restricted shell environment. If you run this command using ADEdit without saving the role to Active Directory, your changes do not take effect.
You can only use the set_rs_env_for_role command if the currently selected zone is a classic4 zone. The command does not work in other types of zones.
Zone Type
Classic only
Syntax
set_rs_env_for_role environment
Abbreviation
srse
Options
This command takes no options.
Arguments
This command takes the following argument:
| Argument | Type | Description |
|---|---|---|
| environment | string | Required. Specifies the name of the restricted shell environment to assign to the current role. |
Return Value
This command returns nothing if it runs successfully.
Examples
set_rs_env_for_role rse1
This example sets the currently selected role’s restricted shell environment to rse1, and removes any existing restricted shell environment or privileged commands if they exist in the role.
Related Commands
The following commands perform actions related to this command:
clear_rs_env_from_roleremoves a restricted shell environment from the current role.get_rs_envsreturns a Tcl list of restricted shell environments.list_rs_envslists tostdoutthe restricted shell environments.new_rs_envcreates a new restricted shell environment and stores it in memory.select_rs_envretrieves a restricted shell environment from Active Directory and stores it in memory.
After you have a restricted shell environment stored in memory, you can use the following commands to work with that: restricted shell environment:
delete_rs_envdeletes the current restricted shell environment from Active Directory and from memory.get_rse_fieldreads a field value from the current restricted shell environment.save_rs_envsaves the restricted shell environment to Active Directory.