<commit_before>#
# Author:: <NAME> <<EMAIL>>
# Cookbook Name:: ad-likewise
# Recipe:: default
#
# Copyright 2010, <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

[ "dcerpcd", "netlogond", "eventlogd", "lwregd", "lwiod", "lsassd" ].each do |svc|
  service svc do
    action :nothing
    only_if { File.exists?("/etc/init.d/${svc}") }
  end
end

package "psmisc"
package "likewise-open"

ad_config = data_bag_item('authorization', node[:authorization][:ad_auth][:ad_network])

execute "initialize-likewise" do
  command "/usr/bin/domainjoin-cli join #{ad_config['primary_domain']} #{ad_config['auth_domain_user']} \"#{ad_config['auth_domain_password']}\""
  only_if "/opt/likewise/bin/lw-get-status |grep -q Status.*Unknown"
end

ad_config['linux_admins'].each do |admin_group|
    sudoers "linux-admins" do
    group admin_group
  end
end

execute "load-reg" do
  command "/usr/bin/lwregshell import /etc/likewise-open/lsassd.reg"
  action :nothing
end

execute "likewise-config-reload" do
  command "/usr/bin/lw-refresh-configuration"
  action :nothing
  subscribes :run, resources(:execute => "load-reg"), :immediately
end
<commit_msg>More ad-auth goodness<commit_after>#
# Author:: <NAME> <<EMAIL>>
# Cookbook Name:: ad-likewise
# Recipe:: default
#
# Copyright 2010, <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

[ "dcerpcd", "netlogond", "eventlogd", "lwregd", "lwiod", "lsassd" ].each do |svc|
  service svc do
    action :nothing
    only_if { File.exists?("/etc/init.d/${svc}") }
  end
end

package "psmisc"
package "likewise-open"

ad_config = data_bag_item('authorization', node[:authorization][:ad_auth][:ad_network])

execute "initialize-likewise" do
  command "/usr/bin/domainjoin-cli join #{ad_config['primary_domain']} #{ad_config['auth_domain_user']} \"#{ad_config['auth_domain_password']}\""
  only_if "/opt/likewise/bin/lw-get-status |grep -q Status.*Unknown"
end

#ad_config['linux_admins'].each do |admin_group|
#    sudoers "linux-admins" do
#    group admin_group
#  end
#end

execute "load-reg" do
  command "/usr/bin/lwregshell import /etc/likewise-open/lsassd.reg"
  action :nothing
end

execute "likewise-config-reload" do
  command "/usr/bin/lw-refresh-configuration"
  action :nothing
  subscribes :run, resources(:execute => "load-reg"), :immediately
end

{'fraction_non_alphanumeric': 0.1313161875945537, 'fraction_numerical': 0.004841149773071104, 'mean_word_length': 4.680412371134021, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '912966', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1081, 'n_words': 328}