Class Sys::Admin
In: ext/sys/admin.c
Parent: Object

A unified, cross platform replacement for the Etc module.

Methods

get_group   get_login   get_user   groups   users  

Classes and Modules

Class Sys::Admin::Error

Constants

VERSION = 1.5.5   The version of this library

Public Class methods

Returns a Group object for the given name or gid. Raises an Admin::Error if a group cannot be found for that name or GID.

Returns the login for the process. If this is called from a process that has no controlling terminal, then it resorts to returning the "LOGNAME" or "USER" environment variable. If neither of those is defined, then nil is returned.

Note that this method will probably return the real user login, but may return the effective user login. YMMV depending on your platform and how the program is run.

Returns a User object for the given name or uid. Raises an Admin::Error if a user cannot be found for that name or user ID.

In block form, yields a Group object for each group on the system. In non-block form, returns an Array of Group objects.

In block form, yields a User object for each user on the system. In non-block form, returns an Array of User objects.

[Validate]