Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/puppet/provider/user/openbsd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,19 @@ def modifycmd(param, value)
end
cmd
end

def password=(value)
user = @resource.name
begin
cmd = [command(:modify), '-p', value, user]
execute_options = {
:failonfail => true,
:combine => true,
:sensitive => has_sensitive_data?
}
execute(cmd, execute_options)
rescue => detail
raise Puppet::Error, "Could not set password on #{@resource.class.name}[#{@resource.name}]: #{detail}", detail.backtrace
end
end
end
Loading