X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/98cce464a451dba30327b140964b0eafbcb9b16a..b20599b6503be65674c3e420be6cca91b507ac0a:/cookbooks/accounts/recipes/default.rb diff --git a/cookbooks/accounts/recipes/default.rb b/cookbooks/accounts/recipes/default.rb index 07d94ee57..9627d1d08 100644 --- a/cookbooks/accounts/recipes/default.rb +++ b/cookbooks/accounts/recipes/default.rb @@ -30,15 +30,14 @@ search(:accounts, "*:*").each do |account| if details[:status] group_members = details[:members] || account["members"] || [] - user_home = details[:home] || account["home"] || "#{node[:accounts][:home]}/#{name.to_s}" + user_home = details[:home] || account["home"] || "#{node[:accounts][:home]}/#{name}" manage_home = details[:manage_home] || account["manage_home"] || node[:accounts][:manage_home] - groups = details[:groups] || account["groups"] || [] group_members = group_members.collect { |m| m.to_s }.sort case details[:status] when "role" - user_shell = "/sbin/nologin" + user_shell = "/usr/sbin/nologin" when "user", "administrator" user_shell = details[:shell] || account["shell"] || node[:accounts][:shell] end @@ -59,7 +58,8 @@ search(:accounts, "*:*").each do |account| supports :manage_home => manage_home end - remote_directory user_home do + remote_directory "/home/#{name}" do + path user_home source name.to_s owner name.to_s group name.to_s