Use the add_command_to_role command to add a privileged UNIX command to the currently selected role that is stored in memory. The command must already exist. You can create privileged UNIX commands using new_dz_command.

The add_command_to_role command does not change the role as it is stored Active Directory. Running the command changes the role only in memory. You must save the role before the added command takes effect in Active Directory. If you select another role or quit ADEdit before saving the role, any commands you’ve added since the last save won’t take effect.

Zone type

Classic and hierarchical


add_command_to_role command[/zonename]




This command takes no options.


This command takes the following argument:

Argument Type Description



Required. Specifies the name of an existing UNIX command to add to the currently selected role.

If the UNIX command right that you want to add is defined in the current zone, the zonename argument is optional. If the UNIX command right is defined in a zone other than the currently selected zone, the zonename argument is required to identify the specific UNIX command right to add.

Return value

This command returns nothing if it runs successfully.


add_command_to_role basicshell/global

This example adds the command basicshell, defined in the global zone, to the currently selected role.

Related commands

Before you use this command, you must have a currently selected role stored in memory. The following commands enable you to view and select a role to work with:

The following commands enable you to work with a currently selected role: