Change root password

I am trying to change the root password and it runs successfully but the password doesn’t work. Here is the code that I am using. I have tried with the gid, uid, and without but still doesn’t work. I am using kitchen with virtualbox.

user 'Setting root password' do
  username 'root'
  password "test123"
  uid '0'
  gid 'root'
  action :modify

I dont think you can put the password in plain text, you have to put the hashed password.

Thanks. I’ll give that a try.

Thanks Nic that is the trick.