[chef] Chef User resource Password attribute


Chronological Thread 
  • From: Kapil Shardha < >
  • To: " " < >
  • Subject: [chef] Chef User resource Password attribute
  • Date: Mon, 31 Mar 2014 17:39:54 +0000
  • Accept-language: en-US

I am trying to use Chef User resource to create a user on Windows platform. The password attribute is set like following:

 

user "TestUser" do

                password "#{node['temp_pass']}"

                action :create

end

 

where the ‘node[temp_pass]’ attribute is being set in a prior ruby_block resource. I get following error :

 

Compiled Resource:

------------------

# Declared in c:/chef/cache/cookbooks/UserCookbook/recipes/user_creation.rb:86:

in `from_file'

 

user("TestUser") do

  action [:create]

  supports {:manage_home=>false, :non_unique=>false}

  retries 0

  retry_delay 2

  username "TestUser"

  cookbook_name " UserCookbook"

  recipe_name " user_creation"

 

“ArgumentError: The password does not meet the password policy requirements.Check the minimum password length, password complexity and password history requirements”.

 

I think the node attribute is not being resolved within the user resource. I wanted to confirm if the password attribute can be set to accept password string from a node attribute. Any idea?

 

Thanks

 

-Kapil

 




This email and any accompanying documents may contain privileged or otherwise confidential information of, and/or is the property of Education Management Solutions, Inc. If you are not the intended recipient, please immediately advise the sender by reply email & delete the message & any attachments without using, copying or disclosing the contents. Thank you.



Archive powered by MHonArc 2.6.16.

§