Class: Chef::Provider::User::Solaris

Inherits:
Useradd show all
Defined in:
lib/chef/provider/user/solaris.rb

Constant Summary collapse

UNIVERSAL_OPTIONS =
[[:comment, "-c"], [:gid, "-g"], [:shell, "-s"], [:uid, "-u"]]

Constants included from Mixin::ShellOut

Mixin::ShellOut::DEPRECATED_OPTIONS

Instance Attribute Summary collapse

Attributes inherited from Chef::Provider::User

#locked, #user_exists

Attributes inherited from Chef::Provider

#action, #cookbook_name, #current_resource, #new_resource, #recipe_name, #run_context

Instance Method Summary collapse

Methods inherited from Useradd

#check_lock, #compile_command, #lock_user, #managing_home_dir?, #remove_user, #universal_options, #unlock_user, #update_options, #updating_home?, #useradd_options

Methods inherited from Chef::Provider::User

#action_create, #action_lock, #action_manage, #action_modify, #action_remove, #action_unlock, #check_lock, #compare_user, #convert_group_name, #define_resource_requirements, #load_current_resource, #lock_user, #remove_user, #unlock_user, #whyrun_supported?

Methods included from Mixin::Command

#chdir_or_tmpdir, #handle_command_failures, #output_of_command, #run_command, #run_command_and_return_stdout_stderr, #run_command_with_systems_locale

Methods included from Mixin::Command::Windows

#popen4

Methods included from Mixin::Command::Unix

#popen4

Methods inherited from Chef::Provider

#action_nothing, #cleanup_after_converge, #converge_by, #define_resource_requirements, #events, #load_current_resource, #node, node_map, #process_resource_requirements, provides, provides?, #requirements, #resource_collection, #resource_updated?, #run_action, #set_updated_status, supports?, #whyrun_mode?, #whyrun_supported?

Methods included from Mixin::DescendantsTracker

#descendants, descendants, direct_descendants, #direct_descendants, find_descendants_by_name, #find_descendants_by_name, #inherited, store_inherited

Methods included from Mixin::ShellOut

#run_command_compatible_options, #shell_out, #shell_out!, #shell_out_with_systems_locale, #shell_out_with_systems_locale!

Constructor Details

#initialize(new_resource, run_context) ⇒ Solaris

Returns a new instance of Solaris.



29
30
31
32
# File 'lib/chef/provider/user/solaris.rb', line 29

def initialize(new_resource, run_context)
  @password_file = "/etc/shadow"
  super
end

Instance Attribute Details

#password_file=(value) ⇒ Object (writeonly)

Sets the attribute password_file

Parameters:

  • value

    the value to set the attribute password_file to.



27
28
29
# File 'lib/chef/provider/user/solaris.rb', line 27

def password_file=(value)
  @password_file = value
end

Instance Method Details

#create_userObject



34
35
36
37
# File 'lib/chef/provider/user/solaris.rb', line 34

def create_user
  super
  manage_password
end

#manage_userObject



39
40
41
42
# File 'lib/chef/provider/user/solaris.rb', line 39

def manage_user
  manage_password
  super
end