Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm going through the Puppet 'Learning' VM. Here's my manifest:

$ensure_val = 'present'

define student($full_name) {

  user { "${title}":
    ensure => $ensure_val,
    comment => "${full_name}",
    groups => "student",
    home => "/home/${title}",
    name => "${title}",
    password => "${title}",
    shell => "/bin/bash",
  }

}

$students = {
  'elion' => {full_name => "El Lion"},
  'azee' => {full_name => "Avery Zee"}
}

create_resources(student, $students)

When I do a puppet apply manifest.pp, it says that everything is created. I do a cat /etc/shadow and indeed those users are there. But doing an 'ls /home` shows an directory.

The VM is running on Centos 5.7. Is there something wrong with the puppet VM? Or am I doing something wrong in the manifest?

share|improve this question

1 Answer 1

up vote 3 down vote accepted
  user { "${title}":
    ensure => $ensure_val,
    comment => "${full_name}",
    groups => "student",
    home => "/home/${title}",
    name => "${title}",
    password => "${title}",
    shell => "/bin/bash",
    managehome => true,
  }

Try adding managehome => true to your user resource, it should create the homedirs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.