Puppet not creating users home directories

699 views
Skip to first unread message

Brandon Whalen

unread,
Jun 2, 2009, 4:16:21 PM6/2/09
to puppet...@googlegroups.com
I'm running puppet 0.24.8, installed from epel, on a RHEL 5.3 box. I've
created some puppet modules and in one of them I attempt to add a user and
pass in the managehome => true flag so that the users home directory is
created. I run puppet in the %post of kickstart file and while the user is
created the home directory of the user is not. If I run puppet after the
installation of the operating system is complete the users home directory is
successfully added. Anyone have any ideas what might be happening?

Thanks in advance,
Brandon


Greg

unread,
Jun 2, 2009, 9:36:59 PM6/2/09
to Puppet Users
Not sure how Kickstart manages postinstall, but in Solaris'
Jumpstart,
the target install is mounted in /a at the time you run the
postinstall
scripts - so everything within the finish scripts needs to take this
into
ccount, either through a chroot, the command being aware of the
new root directory using a -R or similar, or some other means...

For our puppet runs, we wait until the system is booted under its own
kernel before performing any catalogs. Not sure if this is applicable
in
your case, but it may be worth considering as an option.

Greg

Rob McBroom

unread,
Jun 3, 2009, 10:56:36 AM6/3/09
to puppet...@googlegroups.com
On 2009-Jun-2, at 4:16 PM, Brandon Whalen wrote:

> I'm running puppet 0.24.8, installed from epel, on a RHEL 5.3 box.
> I've
> created some puppet modules and in one of them I attempt to add a
> user and
> pass in the managehome => true flag so that the users home directory
> is
> created.

I was just messing with this yesterday. I'm seeing what seems like the
exact opposite behavior (using the same OS and Puppet version). I had
Puppet create a user, noticed that the home directory wasn't created,
consulted the docs, and added the "managehome" line. Still no home
directory, but if I delete the user entirely and let Puppet recreate
it, the home directory does show up.

So, in my experience, the "managehome" option only seems to be
consulted during user creation, but has no effect on existing users.
(I realize the situation that led me to this is not going to be common
in practice, so I think Puppet's behavior here is reasonable, but it
seems to differ from what the OP saw, which is why I mention it.)

--
Rob McBroom
<http://www.skurfer.com/>

The magnitude of a problem does not affect its ownership.

Reply all
Reply to author
Forward
0 new messages