| Class | AutomateIt::AccountManager |
| In: |
lib/automateit/account_manager.rb
|
| Parent: | AutomateIt::Plugin::Manager |
The AccountManager provides a way of managing system accounts, such as Unix users and groups.
Add groupname if it doesn‘t exist. Options:
Add the username if not already created.
Options:
Example:
add_user("bob", :description => "Bob Smith")
Find a group. Method returns a query helper which takes a groupname as an index argument and returns a Struct::Group entry as described in Etc::getgrent if the group exists or a nil if not.
Example:
groups["root"] # => #<struct Struct::Group name="root"... groups["does_not_exist"] # => nil
Invalidate system cache for database. The database can be either :users or :groups. This is necessary on operating systems that lack logic to notify their caching system that an entry changed. If the OS doesn‘t need invalidation, will do nothing and return false.
This method is primarily for the sake of driver authors, recipe authors will probably never need to use this.
Remove the username if present.
Options: