Hmm, I still don't really see what you are intent on doing specifically,
to be honest.

Looking at
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/user/useradd.rb#L195
does this problem not boil down to overriding the passcmd method and
adding some kind of case statements to handle your different environments?

You mentioned at the beginning of the thread that you're facing issues
accessing the resource property values. These *should* work:

min_age = resource.should(:password_min_age)
max_age = resource.should(:password_max_age)

If I'm not mistaken, this should be synonymous with e.g.
resource[:password_min_age]. `resource` is the attr_accessor for
`@resource`. I'm not sure why so much provider code ignores the accessors.

Felix

On 04/16/2014 03:11 AM, James Perry wrote:
> The HPUX code I am trying to modify is already in the existing Puppet
> code base at
> https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/user/hpux.rb.
> 
> 
> The functionality I am trying to use is to set the value of a specific
> property so that I can specify the commands to run depending on which
> password aging scheme is required on a specific HPUX OS version and
> setup. Some are trusted computing, some use a version of the shadow
> password and others just a plain old password file.
> 
> The module I found the functionality I want to extend is based on the
> snippet of code starting at line 11 of
> https://github.com/adrienthebo/puppet-filemapper/blob/master/lib/puppetx/filemapper.rb.
> 
> 
> Unfortunately I am unable to seem to get it to work and thus I am at a
> loss. I really need to be able to ensure that the proper expiry setups
> are in place for HPUX because while I managed to get the password
> functionality into the main stream code base, it is not likewise
> resetting the password expiration for another 90 days and thus the
> account gets locked out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/534E38FC.7090405%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to