new_rs_command

Use the new_rs_command command to create a new restricted shell command under the currently selected restricted shell environment and set the new restricted shell command as the currently selected restricted shell command in memory. The umask field for the new restricted shell command is set to a default value of 077 and default priority field (pri) is set to 0. For more information about restricted shell command fields, see the command description for get_rsc_field.

The new_rs_command command does not save the new restricted shell command to Active Directory. To store the new restricted shell command in Active Directory, you must use save_rs_command. If you don’t save a new restricted shell command, it will disappear when you select another restricted shell command or when the ADEdit session ends.

You can only use the new_rs_command 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

new_rs_command name

Abbreviation

newrsc

Options

This command takes no options.

Arguments

This command takes the following argument:

Argument Type Description

name

string

Required. Specifies the name to assign to the new restricted shell command.

Return value

This command returns nothing if it runs successfully.

Examples

new_rs_command rsc1

This example creates a new restricted shell command named rsc1 in the current zone.

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 the restricted shell command to work with:

  • get_rs_commands returns a Tcl list of restricted shell commands in the current zone.
  • list_rs_commands lists to stdout the restricted shell commands in the current zone.
  • select_rs_command retrieves a restricted shell command from Active Directory and stores it in memory.

After you have a restricted shell command stored in memory, you can use the following commands to work with that restricted shell:

  • delete_rs_command deletes the selected command from Active Directory and from memory.
  • get_rsc_field reads a field value from the currently selected command.
  • save_rs_command saves the selected command with its current settings to Active Directory.
  • set_rsc_field sets a field value in the currently selected command.