NextAvailableGID

Returns or sets the next available value for the group identifier (GID) in the zone.

Syntax

int NextAvailableGID {get; set;}

Property value

The numeric value of the next available GID for the zone.

Discussion

This method returns or sets the next available GID to be used as the default GID assignment for the next group given access to the zone. If you are setting this property as part of creating a new zone, use this value to define the starting GID value for all groups in the zone. In most cases, this value is incremented automatically each time a new group profile is created for the zone. If you are creating new groups programmatically, use this property to read the current value.

There are two versions of this property: one designed for COM-based programs (NextAvailableGID) that supports a 32-bit signed number for the GID and one designed for .NET-based programs (NextGID) that allows a 64-bit signed number for the GID. You can use either property.

Example

The following code sample illustrates setting this property in a script:

...
'Set the container object for the zone
set objContainer = GetObject("LDAP://cn=Zones,cn=UNIX, dc=ajax,dc=org")
'Create a new zone named “Sample_Zone”
set objZone = cims.CreateZone(objContainer, “Sample_Zone”)
'Set the starting UID and GID for the new zone
objZone.nextAvailableUID = 10000
objZone.nextAvailableGID = 10000
...