Skip to content

Instantly share code, notes, and snippets.

@trekr5
Created March 24, 2015 18:00
Show Gist options
  • Select an option

  • Save trekr5/5389bdaa3c5ffcf4e48f to your computer and use it in GitHub Desktop.

Select an option

Save trekr5/5389bdaa3c5ffcf4e48f to your computer and use it in GitHub Desktop.
def remove_login_rights(user)
cookbook_file "ntrights.exe" do
source "ntrights.exe"
path "/windows/temp"
mode '0644'
action :create_if_missing
notifies :run, 'execute[remove-right]', :immediately
end
execute "remove-right" do
#cwd "C:\\windows\\temp"
command "ntrights -u #{user} +r SeDenyInteractiveLogonRight"
action :nothing
end
@trekr5
Copy link
Author

trekr5 commented Mar 24, 2015

would it use powershell under the hood because the vagrant box i'm using is a windows 2012 server

@trekr5
Copy link
Author

trekr5 commented Mar 25, 2015

users_manage "sudo" do
data_bag "aws-admin-users"
group_id node.default['sudo_group_id']
action [:remove, :create]
end

@trekr5
Copy link
Author

trekr5 commented Mar 25, 2015

users_manage "sudo" do
data_bag "aws-admin-users"
group_id node.default['sudo_group_id']
action [:remove, :create]
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment