class Sys::Admin::Group
The Group
class encapsulates information found in /etc/group.
Attributes
Short description of the object.
Description of the group.
Name of the Windows domain to which the group account belongs.
The group's group ID.
Date the group was added.
Sets whether or not the group is local (as opposed to global).
An array of members associated with the group.
The name of the group.
The group password, if any.
Security identifier for this group.
Current status for the group, such as “ok”, “error”, etc.
Public Class Methods
Creates and returns a Group
object, which encapsulates the information typically found within an /etc/group entry, i.e. a struct group.
If a block is provided, yields the object back to the block.
# File lib/sys/admin/common.rb, line 129 def initialize yield self if block_given? end
Public Instance Methods
Returns whether or not the group is a local group.
# File lib/windows/sys/admin.rb, line 963 def local? @local end
Returns the type of SID (Security Identifier) as a stringified value.
# File lib/windows/sys/admin.rb, line 969 def sid_type @sid_type end
Sets the SID (Security Identifier) type to stype
, which can be one of the following constant values:
-
Admin::SidTypeUser
-
Admin::SidTypeGroup
-
Admin::SidTypeDomain
-
Admin::SidTypeAlias
-
Admin::SidTypeWellKnownGroup
-
Admin::SidTypeDeletedAccount
-
Admin::SidTypeInvalid
-
Admin::SidTypeUnknown
-
Admin::SidTypeComputer
# File lib/windows/sys/admin.rb, line 986 def sid_type=(stype) if stype.kind_of?(String) @sid_type = stype.downcase else case stype when Admin::SidTypeUser @sid_type = "user" when Admin::SidTypeGroup @sid_type = "group" when Admin::SidTypeDomain @sid_type = "domain" when Admin::SidTypeAlias @sid_type = "alias" when Admin::SidTypeWellKnownGroup @sid_type = "well_known_group" when Admin::SidTypeDeletedAccount @sid_type = "deleted_account" when Admin::SidTypeInvalid @sid_type = "invalid" when Admin::SidTypeUnknown @sid_type = "unknown" when Admin::SidTypeComputer @sid_type = "computer" else @sid_type = "unknown" end end @sid_type end