get_rsc_field

Use the get_rsc_field command to return the value of a specified field value from the currently selected restricted shell command that is stored in memory. Centrify-specific fields are similar to Active Directory attributes but are stored within the Active Directory schema.

The get_rsc_field command does not query Active Directory for the restricted shell command. If you change field values using ADEdit without saving the restricted shell command to Active Directory, the field value you retrieve using get_rsc_field won’t match the value stored in Active Directory.

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

get_rsc_field field

Abbreviation

grscf

Options

This command takes no options.

Arguments

This command takes the following argument:

Argument Type Description

field

string

Required. Specifies the name of the field whose value you want to retrieve. The possible values are:

  • description: Returns text describing the restricted shell command.
  • cmd: Returns the restricted shell command string or strings.
  • path: Returns the path to the command’s location.
  • form: Returns an integer that indicates whether the cmd and path strings use wild cards (0) or a regular expression (1).
  • dzsh_runas: Returns a list of users and groups that can run this command in a restricted shell environment (dzsh). Users can be listed by user name or UID.
  • keep: Returns a comma-separated list of environment variables from the current user’s environment to keep.
  • del: Returns a comma-separated list of environment variables from the current user’s environment to delete.
  • add: Returns a comma-separated list of environment variables to add to the final set of environment variables.
  • pri: Returns a n integer that specifies the command priority for the restricted shell command object.
  • umask: Returns an integer that defines who can execute the command.
  • flags: Returns an integer that specifies a combination of different properties for the command.
  • createTime: The time and date this command was created, returned in generalized time format.
  • modifyTime: The time and date this command was last modified, returned in generalized time format.
  • dn: The command’s distinguished name.

Return value

This command returns a field value. The data type depends on the field specified. For more information about the field values returned by different fields, see get_dzc_field.

Examples

get_rsc_field description

This example returns the contents of the description field:

This is the RSC description

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.
  • new_rs_command creates a new restricted shell command and stores it in memory.
  • 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.
  • 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.