-
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Daniel Berger edited this page Jan 28, 2019
·
9 revisions
The sys-admin library is a unified, cross platform replacement for the Etc
module.
gem install sys-admin
require 'sys/admin' # or sys-admin
include Sys
# Returns an Array of User objects
a = Admin.users
# Returns an Array of Group objects
g = Admin.groups
# Get information about a particular user
p Admin.get_user("nobody")
p Admin.get_user("nobody", :localaccount => true)
# Get information about a particular group
p Admin.get_group("adm")
p Admin.get_group("adm", :localaccount => true)