diff options
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/user/dscl.rb | 11 | ||||
-rw-r--r-- | lib/chef/provider/windows_task.rb | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb index 50d255db8b..79a2c73339 100644 --- a/lib/chef/provider/user/dscl.rb +++ b/lib/chef/provider/user/dscl.rb @@ -214,7 +214,7 @@ user password using shadow hash.") # # Sets the user id for the user using dscl. # If a `uid` is not specified, it finds the next available one starting - # from 200 if `system` is set, 500 otherwise. + # from 200 if `system` is set, 501 otherwise. # def dscl_set_uid # XXX: mutates the new resource @@ -229,11 +229,11 @@ user password using shadow hash.") # # Find the next available uid on the system. starting with 200 if `system` is set, - # 500 otherwise. + # 501 otherwise. # def get_free_uid(search_limit = 1000) uid = nil - base_uid = new_resource.system ? 200 : 500 + base_uid = new_resource.system ? 200 : 501 next_uid_guess = base_uid users_uids = run_dscl("list", "/Users", "uid") while next_uid_guess < search_limit + base_uid @@ -326,10 +326,7 @@ user password using shadow hash.") end def ditto_home - skel = "/System/Library/User Template/English.lproj" - raise(Chef::Exceptions::User, "can't find skel at: #{skel}") unless ::File.exist?(skel) - shell_out_compact!("ditto", skel, new_resource.home) - ::FileUtils.chown_R(new_resource.username, new_resource.gid.to_s, new_resource.home) + shell_out_compact!("/usr/sbin/createhomedir", "-c", "-u", "#{new_resource.username}") end def move_home diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index c9109d6996..0bb28c66c6 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -231,6 +231,7 @@ class Chef # seprated command arguments from :command property def set_command_and_arguments + new_resource.command = new_resource.command.gsub(/\\/, '\&\&') cmd, *args = Shellwords.split(new_resource.command) new_resource.command = cmd new_resource.command_arguments = args.join(" ") |