Bug #12081
The pw user provider on FreeBSD doesn't remove the user's home directory when deleting the user and managehome is set
| Status: | Closed | Start date: | 01/23/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | FreeBSD | |||
| Target version: | 2.7.12 | |||
| Affected Puppet version: | Branch: | https://github.com/puppetlabs/puppet/pull/391 | ||
| Keywords: | ||||
| Votes: | 0 |
Description
This issue is identical to #10354 but for the pw user provider rather than the useradd provider.
The documentation states the the managehome flag means “The provider can create and remove home directories”. However this is untrue for the pw provider since the -r flag is missing from the command.
This demonstrates the issue (taken from #10354):
ralsh user test2 ensure=present managehome=true allowdupe=false uid=10000 && ls -l /home ralsh --debug user test2 ensure=absent managehome=true allowdupe=false uid=10000 && ls -l /home
The home directory will still exist and the command executed in the second step is:
debug: User[test2](provider=pw): Executing '/usr/sbin/pw userdel test2'
I’ve been aware of this for a while but I’ve been waiting to see what the decision was on #10354. I’ll work on a fix and do a pull request.
Related issues
History
Updated by Tim Bishop 4 months ago
- Status changed from Unreviewed to In Topic Branch Pending Review
- Branch set to https://github.com/puppetlabs/puppet/pull/391
Updated by Daniel Pittman 4 months ago
This passes tests, looks sane, and is correct according to the FreeBSD pw(8) manual page. Merge is blocked pending sorting out a broken build internally, but once that is done we can totally get this in.
Updated by Daniel Pittman 4 months ago
- Status changed from In Topic Branch Pending Review to Merged - Pending Release
- Target version set to 2.7.11
- Affected Puppet version deleted (
2.7.10rc1)
Tim, I am sorry this didn’t get responded to sooner. I must have missed it on my list of “blocked by a broken build” tickets earlier, and so it waited until I was checking older pull requests. Thanks so much for the submission. Don’t hesitate to follow up if I promise to merge something, then fall through on you. ;)
Updated by Matthaus Litteken 3 months ago
- Status changed from Merged - Pending Release to Closed
- Target version changed from 2.7.11 to 2.7.12
Released in Puppet 2.7.12rc1