Class | Sys::Admin |
In: |
ext/sys/admin.c
|
Parent: | Object |
A unified, cross platform replacement for the Etc module.
VERSION | = | 1.5.2 | The version of this library |
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.