title: Chef: Initialize new linux user if it doesn't already exist
body: <p>I'm trying to use Chef to create a new user and expire the user's password if the user doesn't already exist.</p>
  
  <p>I've managed to do it by using a bash script and executing it on the agent server but I'd like a cleaner way.</p>
  
  <p>Current Bash Script:</p>
  
  <p><a href="http://i.gyazo.com/fdd49630f58f9b0e0acdc324143e3481.png" rel="nofollow">http://i.gyazo.com/fdd49630f58f9b0e0acdc324143e3481.png</a></p>
  
  <p>Wanted Use in the recipe:</p>
  
  <pre><code>inituser do
      username =&gt; "username"
      password =&gt; "password"
      group =&gt; "group":
  end
  </code></pre>
  
  <p>With the above code creating a new user if it doesn't already exist and expiring its password.</p>
  
  <p>Thank you!</p>
  
  <p>UPDATE: Sorry for my poor communication but what I'm wanting to do is have my own custom resource which will "parse" the username, password, and group to the my prewritten bash resource I have above.</p>