Issue #14170 has been updated by Stefan Schulte.

I don't think that user expiry should allow a value of `-1`, because this is 
provider specific (e.g. `/etc/shadow` defines an empty value as "no expiry", 
`chage -E` defines `-1` as a value of no expiry and `usermod` accepts `''` as 
value for "no expiry".

Instead I prefer a value of `absent` at a resource type level and the provider 
should do whatever necessary to remove the expiry. This was implemented in 
#11675 for the `useradd` provider. Does this match your expection?
----------------------------------------
Bug #14170: user expiry not accepting -1
https://projects.puppetlabs.com/issues/14170#change-81641

Author: Don Mac
Status: Needs Decision
Priority: Low
Assignee: 
Category: user
Target version: 
Affected Puppet version: 2.7.11
Keywords: users expiry expire chage
Branch: 


When setting the account expiration to -1 it's failing.

        user { "newuser":
                gid => 600,
                name => "newuser",
                uid => 600,
                password_min_age => 0,
                password_max_age => 99999,
                expiry => -1,
        }
err: Failed to apply catalog: Parameter expiry failed: Expiry dates must be 
YYYY-MM-DD

When using 1969-12-31, it sets the expire time to 0 which is immediate 
expiration.
I believe this is an issue with usermod and not puppet.


with RHEL5 there is a command to do this 'chage -E -1 newuser' would set the 
user to never expire

Workaround is to set the expire far into the future.


-- 
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].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to