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

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

Zone type

Classic and hierarchical


set_zone_user_field field value




This command takes no options.


This command takes the following arguments:

Argument Type Description



Required. Specifies the name of the field y want set. The possible values are:

  • uname: Sets the text string to use for the UNIX user name.

    If you are setting this field in a Service for UNIX (SFU) zone, this name must be unique among all the SFU zones. If you duplicate a user name that exists in another SFU zone, that user will be moved to the currently selected SFU zone when you save the zone user.

  • uid: Sets the numeric identifier for the user (UID).
  • gid: Sets the numeric identifier for the user’s primary group (GID).

    Set the value to 0x80000000 to indicate a private group (the user’s UID is used as the GID).

  • gecos: Sets the text string to use for the user’s GECOS field.
  • home: Sets the text string that specifies the user’s home directory.
  • shell: Sets the text string that specifies the user’s default shell type.
  • enabled: Specifies whether user is enabled or not. This field is only valid in classic zones. Set the value to 1, y, yes, or true if the user is enabled in the zone or to 0, n, no, or false if the user is disabled in the zone. All other values throw an exception.

You can also specify AIX extended attributes as the field to set an extended attribute value for a zone user.



Required. Specifies the value to assign to the specified field. The data type depends on the field specified.

In some cases, you can assign a dash (-) to a field to unset the field value. However, this is not supported for all fields or all zone types.

Return value

This command returns nothing if it runs successfully.


The following example sets the current zone user’s UNIX user name to buzz:

set_zone_user_field uname buzz

This following example sets the current zone user’s primary GID to the same value as the user’s UID:

set_zone_user_field gid 0x80000000

If the current zone user is on AIX, you can set extended attributes and values. For example:

set_zone_user_field aix.ttys u1,u2,u3
set_zone_user_field aix.fsize 209715
set_zone_user_field aix.core 2097151
set_zone_user_field aix.cpu -1

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

  • get_zone_users returns a Tcl list of the Active Directory names of all zone users in the current zone.
  • list_zone_users lists to stdout the zone users and their NSS data in the current zone.
  • new_zone_user creates a new zone user and stores it in memory.
  • select_zone_user retrieves a zone user from Active Directory and stores it in memory.

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

  • delete_zone_user deletes the selected zone user from Active Directory and from memory.
  • get_zone_user_field reads a field value from the currently selected zone user.
  • save_zone_user saves the selected zone user with its current settings to Active Directory.