Last active
August 29, 2015 14:01
-
-
Save discreet/f24c64026b6bb3f0cc4b to your computer and use it in GitHub Desktop.
This fact will pull a list of domain users and groups who have access
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 fact will pull securiy groups and users who have access if you are using PBIS. | |
Facter.add("Domain_Access") do | |
confine :osfamily => "RedHat" | |
setcode do | |
if File.directory? "/opt/likewise" | |
Domain_Access = `/opt/likewise/bin/lwconfig --detail RequireMembershipOf | grep '"' | sed -e 's/^"//' -e 's/"$//' | awk -F'\\' '{print $3}'` | |
$Access = split($Domain_Access, ' ') | |
Domain_Access | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment