Issue #7500 has been updated by Patrick Carlisle.

Status changed from Merged - Pending Release to Closed

Released in 2.7.10.
----------------------------------------
Bug #7500: Don't let pw provider use -p
https://projects.puppetlabs.com/issues/7500#change-58689

Author: Douglas Rand
Status: Closed
Priority: Normal
Assignee: Douglas Rand
Category: FreeBSD
Target version: 2.7.10
Affected Puppet version: 2.6.7
Keywords: freebsd pw password
Branch: 


The -p option to pw is documented as:

<pre>
-p date       Set the account's password expiration date.  This field is
              similar to the account expiration date option, except that
              it applies to forced password changes.  This is set in the
              same manner as the -e option.
</pre>

But provider/user/pw.rb takes the first character of each property as
the option to pw (through provider/nameservice/objectadd.rb I think).

The problem is that that sets the password as expiring now().

Here is a patch to ignore the password property, which is already
handled via cryptpw in pw.rb:

<pre>
--- pw.rb-orig  2011-05-12 16:47:24.000000000 -0500
+++ pw.rb       2011-05-12 16:47:16.000000000 -0500
@@ -24,7 +24,7 @@
   def addcmd
     cmd = [command(:pw), "useradd", @resource[:name]]
     @resource.class.validproperties.each do |property|
-      next if property == :ensure
+      next if property == :ensure or property == :password
       # the value needs to be quoted, mostly because -c might
       # have spaces in it
       if value = @resource.should(property) and value != ""
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to