The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #10962

Updated by Tim Bishop about 3 years ago

*Please note the pull request referenced on this issue includes more than just this change*

When a user's home directory is changed using the pw user provider the executed command is:

<pre>
pw usermod [name] -d [home]
</pre>

If managehome is set to true the `-m` flag should also be given. This happens correctly at create time but not if the home directory is changed on an existing resource.

As an aside, the behaviour of `-m` on an existing user is to create the new home directory, assuming it doesn't already exist, in the same way it would when creating a new user.

I've produced a fix for this issue (on a branch with a bunch of other related FreeBSD pw improvements):

https://github.com/tdb/puppet/commit/ec452a8f1932ab8ce41e460f83ca8782016328aa https://github.com/tdb/puppet/commit/2a075ef57719e18eff7b1ea15ad1f7e584ef7aaa

With this fix applied the command executed would be:

<pre>
pw usermod [name] -d [home] -m
</pre>

Back