Issue #10354 has been reported by Bernard Nauwelaerts.

----------------------------------------
Bug #10354: Missing userdel flag in provider/useradd.rb when managehome is set 
to true
https://projects.puppetlabs.com/issues/10354

Author: Bernard Nauwelaerts
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: userdel managehome
Branch: 


The documentation states about the managehome parameter : "The provider can 
create and remove home directories"

But when managehome=true and ensure=absent, the home directory remains on the 
target system because the -r flag is missing.

deletecmd is herited from objectadd.rb, so I solved this issue by overwriting 
it in useradd.rb. As I'm unfamiliar with ruby, there may be better ways to 
achieve this. Thanks.

  def deletecmd
    cmd = [command(:delete)]
        if @resource.managehome?
                cmd << "-r"
        end
    cmd << @resource[:name]
  end


-- 
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