Created user with chef.But i am not able to login

Hi Guys,

I created a user with chef using user resource in chef docs but when i try to switch the user iam getting error.
Finally i came to know when i give password manually iam able to login but when i give password using chef resource getting error…Please give me the exact syntax how to create and assign a password for the user in linux.

A couple things to check:

  • ruby-shadow installed? /opt/chef/embedded/gem install lib-shaddow
  • create the sha of the password rather than passing the actual password via openssl passwd -1 "theplaintextpassword" or mkpasswd -m sha-512

There are some more complex modes that are all found here: