title: Chef Cookbook for Creating User
body: <p>I'd like to create a new user <code>kevin</code> with a password of <code>kevin</code>.</p>
  
  <p><strong>cookbooks/make_user/recipes/default.rb</strong></p>
  
  <pre><code>user "kevin" do
    comment "default user"
    home "/home/kevin"
    shell "/bin/bash"
    password "kevin"
  end
  </code></pre>
  
  <p>After provisioning my Vagrant box, I ssh'd onto the box. However, I was unable to <code>su</code> as the <code>kevin</code> user with a password of <code>kevin</code>.</p>
  
  <pre><code>[vagrant@vagrant-centos65 ~]$ su kevin
  Password: 
  su: incorrect password
  </code></pre>
  
  <p>Looking at the Chef 'users' <a href="http://docs.opscode.com/resource_user.html" rel="nofollow">docs</a>, I'm not sure that <code>password</code> is the right attribute to modify.</p>
  
  <pre><code>password    The password shadow hash. This attribute requires that 
              ruby-shadow be installed. This is part of the Debian package: 
              libshadow-ruby1.8.
  </code></pre>
  
  <p>How can I modify my above cookbook so that I can <code>su</code> as <code>kevin</code> with the same password?</p>