getOSGroupInfo()

Returns the attributes of a domain group.

Synopsis

mapping getOSGroupInfo( string groupName, [string domain]);

Parameters

Parameter Description
groupName The group name.
domain

The parameter "domain" specifies in which domain the query is executed. The default value is the domain of the current computer (where the query is executed). If only one domain exists in the IT infrastructure, the parameter does not bear a meaning. If the IT infrastructure consists of several domains and a group was created in another domain than where the query is executed, the group is not found. In this case, specify the correct domain by using the parameter "domain".

Example:

  • The group belongs to the domain "Domain1" and the computer used to execute the query was logged on in the same domain -> the group is found.

  • The computer is logged on in another domain than "Domain1", the group is not found or if a group with the same name exists in this other domain, the wrong group is found.

The domain parameter is not used under Linux.

Return value

Attributes of a group (of a domain).

Description

Returns the attributes of a group (of a domain). The attributes are saved in a mapping with the following keys:

"Name"; : Name of the group

"Comment";: Description of the group

"OSID": Operating system ID of the group

"OSID" may return another value for Unix systems than for Windows systems in an ActiveDirectory environment since Unix (for example, Samba) maps the Windows specific ID (SID) into a Unix specific ID (unsigned).

Under Linux the "GECOS" entry form the password file is split into "Fullname,Comment". If no "," is available the "Comment" entry will be empty.

Example

The following example returns the attributes of the group "ETM".

main()
{
  mapping m;
  m = getOSGroupInfo("ETM");
  DebugN("Information of group ETM ",
  m);
}

Assignment

User administration

Availability

CTRL