-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fact to list all members of the admin group
- Loading branch information
1 parent
140e81e
commit 5a6ee40
Showing
4 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#Changelog | ||
|
||
##0.5.0 | ||
|
||
Fact listing all the users in the admin group. | ||
|
||
##0.4.0 | ||
|
||
Changes for an upcoming OS release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#mac_admin_users.rb | ||
#require 'facter' | ||
Facter.add(:mac_admin_users) do | ||
confine :kernel => "Darwin" | ||
setcode do | ||
admins = Facter::Util::Resolution.exec("dscl . -read /Groups/admin GroupMembership") | ||
|
||
admins.gsub('GroupMembership: ','').gsub(' ', ', ') | ||
end | ||
end |