get_zone_field

Use the get_zone_field command to return the value for a specified field from the currently selected zone stored in memory. The get_zone_field command does not query Active Directory for this zone. If you change field values using ADEdit without saving the zone to Active Directory, the field value you retrieve using get_zone_field won’t match the same field value for the zone stored in Active Directory.

Zone type

Classic and hierarchical

Syntax

get_zone_field field

Abbreviation

gzf

Options

This command takes no options.

Arguments

This command takes the following argument:

Argument Type Description

field

string

Required. Specifies the case-sensitive name of the field whose value to retrieve.

The data type depends on the field you return. The possible field values are:

  • availableshells: Returns the shells available to assign to new users in the zone.
  • block.parent.zgroup: Returns the value of the block.parent.zgroup field in the zone object’s description.
  • cloudurl: Returns the name of the cloud instance associated with the selected zone.
  • computers: Returns the computer group UPN that is assigned to the computer role selected as a zone.
  • createTime: Returns the time and date this zone was created.
  • customAttr: Returns the custom text strings that have been set for the zone. This field is only applicable for hierarchical zones.
  • defaultgid: Returns the default primary group to assign to new users.
  • defaultgecos: Returns the default GECOS data to assign to new users.
  • defaulthome: Returns the default home directory to assign to new users.
  • defaultshell: Returns the default shell to assign to new users.
  • description: Returns the description of the zone.
  • dn: Returns the zone’s distinguished name.
  • gidnext: Returns the next GID to use when auto-assigning GID numbers to new groups.
  • gidreserved: Returns the GID number or range of numbers (1-100) that are reserved.
  • groupname: Returns the default group name used for new groups in the zone.
  • modifyTime: Returns the time and date this zone was last modified.
  • nisdomain: Returns the name of the NIS domain if it has been set.
  • parent: Returns the distinguished name (DN) of the parent zone for the selected zone.
  • schema: Returns the schema used in this zone, for example, std.
  • sid2iddomainmap: Returns the domain ID mapping from the selected zone. This field is not supported for auto zones nor classic zones.
  • sfudomain: Returns the Windows domain name for the SFU zone. Only use this argument if the current zone is a Service for UNIX (sfu) zone.
  • tenantid: Returns the Centrify Identity Plaform tenant ID for the zone. This field is only applicable for hierarchical zones.
  • type: Returns the type of the zone, for example, classic4 or tree.
  • uidnext: Returns the next UID to use when auto-assigning UID numbers to new users.
  • uidreserved: Returns the UID number or range of numbers (1-100) that are reserved.
  • username: Returns the default user name used for new users in the zone.

For more information about the values returned by these fields, see the Return value section.

Return value

This command returns the current value for the specified field. The data type depends on the field specified.

This field Returns

availableshells

Returns the list of shells available to choose from when adding new users to the currently selected zone. The value is a list of shell paths, separated by colons (:). For example, “/bin/bash:/bin/csh:/bin/ksh

block.parent.zgroup

Returns the value of the block.parent.zgroup field from the zone object’s description for the currently selected zone. This field can be true if you want to prevent groups provisioned in the parent zone from being visible in the child zone if they aren’t being used. The default value is false.

cloudurl

Returns the fully-qualified URL of the cloud instance associated with the selected zone.

computers

Returns the computer group UPN that is assigned to the computer role if the currently selected zone is a “computer role” zone.

createTime

Returns the time and date this zone was created (in generalized time format).

defaultgid

Returns the default primary group to assign to new users in the currently selected zone. The value can be a specific GID value or include variables.

defaultgecos

Returns the default GECOS data to assign to new users in the currently selected zone. The value can be a string or include variables.

defaulthome

Returns the default home directory to assign to new users in the currently selected zone. The value can be a string that defines the path or include variables.

defaultshell

Returns the default shell to assign to new users in the currently selected zone. The value can be a string that defines the shell or include variables.

description

Returns the description of the zone. If the currently selected zone is a computer role, this field returns the Active Directory description attribute for the msds-AzScope object.

dn

Returns the zone’s distinguished name. If the currently selected zone is a computer role, this field returns the Active Directory distinguished name attribute of the msds-AzScope object.

gidnext

Returns the next GID to use when auto-assigning GID numbers to new groups in the currently selected zone.

gidreserved

Returns the GID number or range of numbers (1-100) that are reserved in the currently selected zone.

groupname

Returns the default group name used for new groups in the currently selected zone. You can only return the value for this field if the current zone is a hierarchical zone.

modifyTime

Returns the time and date this zone was last modified (in generalized time format).

nisdomain

Returns the name of the NIS domain if it has been set. The default value is the zone name.

parent

Returns the distinguished name (DN) of the parent zone for the currently selected zone. You can only return the value for this field if the current zone is a hierarchical zone. You can use the option -raw with this field to return the parentLink attribute in the raw Guid@Domain format.

schema

Returns the schema used in this zone, for example, std.

sfudomain

Returns the Windows domain name for the SFU zone. Only use this argument if the current zone is a Service for UNIX (sfu) zone.

sid2iddomainmap

Returns a comma-separated key value pairs string. If an empty string is returned, that means that there's no domain ID mapping for the selected zone.

tenantid

Returns the tenant ID of the cloud instance associated with the selected zone.

type

Returns the type of the currently selected zone. For example, this field returns classic3 or classic4 for a classic zone or tree for a hierarchical zone.

uidnext

Returns the next UID to use when auto-assigning UID numbers to new users in the currently selected zone.

uidreserved

Returns the UID number or range of numbers (1-100) that are reserved in the currently selected zone.

username

Returns the default user name used for new users in the zone. You can only return the value for this field if the current zone is a hierarchical zone.

Examples

get_zone_field type

This example returns the zone type:

tree

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 zone:

  • create_zone creates a new zone in Active Directory.
  • get_zones returns a Tcl list of all zones within a specified domain.
  • select_zone retrieves a zone from Active Directory and stores it in memory.

After you have a zone stored in memory, you can use the following commands to work with that zone computer:

  • delegate_zone_right delegates a zone use right to a specified user or computer.
  • delete_zone deletes the selected zone from Active Directory and memory.
  • get_child_zones returns a Tcl list of child zones, computer roles, or computer zones.
  • get_zone_nss_vars returns the NSS substitution variable for the selected zone.
  • save_zone saves the selected zone with its current settings to Active Directory.
  • set_zone_field sets a field value in the currently selected zone.