A collection of task oriented solutions in Puppet


Create a home directory for managed users


You've added a user with puppet but its home directory was not created


class add_user {

  user { 'mcfakey':
    ensure     => 'present',
    managehome => true,



When you create a user puppet does not automatically create its home directory, because not all the providers support this functionality. If your systems provider can handle home directories (which you can check in the manages_homedir column of the user provider features table , and most Linux systems can, you can tell puppet to create the users home directory by specifying managehome => true.

See also