diff options
Diffstat (limited to 'lib/chef/provider/user/solaris.rb')
-rw-r--r-- | lib/chef/provider/user/solaris.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/chef/provider/user/solaris.rb b/lib/chef/provider/user/solaris.rb index 8d3df9e68b..04567e6bca 100644 --- a/lib/chef/provider/user/solaris.rb +++ b/lib/chef/provider/user/solaris.rb @@ -73,6 +73,21 @@ class Chef private + # Override the version from {#Useradd} because Solaris doesn't support + # system users and therefore has no `-r` option. This also inverts the + # logic for manage_home as Solaris defaults to no-manage-home and only + # offers `-m`. + # + # @since 12.15 + # @api private + # @see Useradd#useradd_options + # @return [Array<String>] + def useradd_options + opts = [] + opts << "-m" if managing_home_dir? + opts + end + def manage_password if @current_resource.password != @new_resource.password && @new_resource.password Chef::Log.debug("#{@new_resource} setting password to #{@new_resource.password}") |