(#11046) improve freebsd user and group providers #338

merged 4 commits into from Jan 18, 2012


None yet
3 participants

pcarlisle commented Jan 17, 2012

Add password support to FreeBSD and enhance the pw user and group providers.

tdb added some commits Nov 18, 2011

(#11318) Add password management on FreeBSD
This adds the manages_passwords feature to the pw user provider. It is based
on the patch by Andrew Hust that was integrated into FreeBSD puppet port. It
adds tests covering the create, delete and modify processes of the provider.

This integrates a fix for #7500 that was introduced by the original patch.
The existing code takes the first character of each property and uses it as a
flag. However, with pw, the -p flag is for setting the password expiration.
The result is that the password isn't set at create time and that the password
is set to expire. The next run of puppet correctly sets the password but the
expiry is still set. The new code avoids using -p for passwords, and also sets
the password correctly when an account is created.

Reviewed-by: Patrick Carlisle <patrick@puppetlabs.com>
(#10962) Make sure managehome is respected on FreeBSD
When modifying the home directory of a user and managehome is set
the -m flag should be used with pw. This ensures that the new home
directory is created if it doesn't exist.

Also add test to verify this behaviour.
(#11046) Improve pw group provider on FreeBSD
Make the pw group provider on FreeBSD support managing group members.
Also readd the allowdupe feature since in testing on FreeBSD 7, 8
and 9 the -o flag to pw works as documented.

Add tests for the provider.

Reviewed-by: Patrick Carlisle <patrick@puppetlabs.com>
(#11046) Add support for user expiry in pw user provider
Add support for setting an expiry date for a user in the pw user
provider. FreeBSD uses the format DD-MM-YYYY rather than Puppet's
YYYY-MM-DD. Tests added to confirm the value is correctly swapped

Also added custom accessor method to take the unix timestamp given
by the operating system to a Puppet-style YYYY-MM-DD. This stops
Puppet from repeatedly trying to set the expiry date if it's already

slippycheeze added a commit that referenced this pull request Jan 18, 2012

Merge pull request #338 from pcarlisle/ticket/2.7.x/freebsd-user-pass…

(#11046) improve freebsd user and group providers

@slippycheeze slippycheeze merged commit 75d7cad into puppetlabs:2.7.x Jan 18, 2012

hlindberg pushed a commit to hlindberg/puppet that referenced this pull request Oct 16, 2014

Nick Fagerlund
Merge pull request #338 from llowder/fix_for_DOC-847
(DOC-847) Deployment Guide has inappropriate example

melissa pushed a commit to melissa/puppet that referenced this pull request Mar 30, 2018

Merge pull request #338 from james-stocks/client_connect
(maint) Acceptance - restructure retry logic for PCP client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment