Created
March 24, 2015 16:27
-
-
Save trekr5/02e879519c81157c95e9 to your computer and use it in GitHub Desktop.
remove rights
This file contains hidden or 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
def remove_login_rights(user) | |
cookbook_file "ntrights.exe" do | |
source "ntrights.exe" | |
path "C:/users/#{user}" | |
mode '0644' | |
action :create_if_missing | |
notifies :run, 'execute[remove-right]', :immediately | |
end | |
execute "remove-right" do | |
#cwd "C:\\windows\\temp" | |
command "cmd && ntrights -u #{user} +r SeDenyInteractiveLogonRight" | |
action :nothing | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment