Use the set_zone_field command to set the value for a specified field in the currently selected zone stored in memory. The set_zone_field command does not set a field value stored in Active Directory for the selected zone.

If you change any fields, you must save the zone using the save_zone command for your changes to take effect in Active Directory. If you select another zone or end the ADEdit session before saving the currently selected zone, your changes will be lost.

This command is not applicable if the currently selected zone is a classic-computer zone. You cannot set zone field values for classic-computer zones.

Zone type

Classic and hierarchical


set_zone_field field value




This command takes no options.


This command takes the following arguments:

Argument Type Description



Required. Specifies the name of the field that you want to set.



Required. Specifies the value to assign to the specified field.

In most cases, you can assign an empty string to unset the field value. For more information about the values set by the zone fields, see the Field value section.

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

  • availableshells: Sets the list of shells available to choose from when adding new users to the zone.
  • block.parent.zgroup: Sets the value of the block.parent.zgroup field in the zone object’s description.
  • cloudurl: Sets the URL of the cloud instance associated with the selected zone.
  • computers: Sets the UPN of the computer group assigned to the selected computer role.
  • customAttr: Sets custom text strings for the zone. This field is only applicable for hierarchical zones.
  • defaultgid: Sets the default primary group to assign to new users.
  • defaultgecos: Sets the default GECOS data to assign to new users.
  • defaulthome: Sets the default home directory to assign to new users.
  • defaultshell: Sets the default shell to assign to new users.
  • description: Sets the text string that describes the zone.
  • gidnext: Sets the next GID to use when auto-assigning GID numbers to new groups.
  • gidreserved: Sets the GID number or range of numbers (1-100) that are reserved.
  • groupname: Sets the default group name used for new groups in the zone.
  • nisdomain: Sets the name of the NIS domain for NIS clients to use.
  • nssvar: Sets the NSS substitution variable to add to the zone’s list of substitution variables.
  • parent: Sets the distinguished name of the zone’s parent zone.
  • sfudomain: Sets the Windows domain name for the SFU zone.
  • sid2iddomainmap: Sets the domain ID map for the seleted zone. Specify the mapping with a comma-separated key value pairs string. See the examples section for a sample command with this field. Note that the range of domain IDs is 0 to 511. Duplicate mapping entries are not allowed (domain names are not case-sensitive). This field is not supported for auto zones nor classic zones.
  • tenantid: Returns the Centrify Platform tenant ID for the zone. This field is only applicable for hierarchical zones.
  • uidnext: Sets the next UID to use when auto-assigning UID numbers to new users.
  • uidreserved: Sets the UID number or range of numbers (1-100, for example) that are reserved.
  • username: Sets the default user name used for new users in the zone.

Return value

This command returns nothing if it runs successfully.


The following example sets the computer group associated with the currently selected computer role to linux_machines in the domain

set_zone_field computers

The following example sets the parent zone of the current zone to global in the domain

szf parent “CN=global,CN=zones,CN=Acme,CN=Program Data,DC=acme,DC=com”

The following example sets the domain ID mapping for the selected zone:

set_zone_field sid2iddomainmap domain0.test=0,domain1.test=1,domain2.test=2

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 a zone to work with:

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

  • 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_field reads a field value from the currently selected zone.
  • 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.