The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #6371

changing users password does not reset lastchg field.

Added by Merritt Krakowitzer over 3 years ago. Updated 10 months ago.

Status:ClosedStart date:02/18/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:user
Target version:3.3.0
Affected Puppet version:2.7.12 Branch:https://github.com/puppetlabs/puppet/pull/1640
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

When updating a password via puppet.

user { "storeadm":
    password => 'MYSECRETPASSWORD',
}

puppet will change the password, but it will not update the lastchg field to the day it changed it.

contents of the old shadow file:

storeadm:OLDSECRETPASSWORD:14960::28:7:::

contents of the new shadow file

storeadm:MYSECRETPASSWORD:14960::28:7:::

so in essence the password is still expired, even though the password was just reset.

running puppet 2.6.4 on solaris. Would be nice if it would also work with solaris roles.


Related issues

Duplicates Puppet - Bug #5620: user password age not updating "lastchg" field in shadow ... Tests Insufficient 12/21/2010

History

#1 Updated by Zach Leslie over 3 years ago

  • Status changed from Unreviewed to Accepted

#2 Updated by James Turnbull over 3 years ago

Merritt – Puppet supports Solaris roles already? Or did you mean something more specific than that?

I also think this is probably a Solaris specific bug – have you seen it on other platforms?

#3 Updated by James Turnbull over 3 years ago

  • Category set to user
  • Status changed from Accepted to Needs More Information

#4 Updated by Merritt Krakowitzer over 3 years ago

More specific, The issue described applies for solaris roles too, so im not sure if it gets fixed for solaris users, if it would now work with a solaris role.

There are other platorms other than Solaris? Say it aint so :)

A quick check on ubuntu seems to work

test:MYSECRET:15000:0:1:7:::
test:MYNEWSECRET:15030:0:1:7:::

So it must be Solaris specific.

#5 Updated by Stefan Schulte over 3 years ago

IIRC puppet will use operating system tools to alter the password on linux. On a solaris box puppet will parse /etc/shadow and just substitudes the crypted password. So the provider has to also alter the lastchg field by hand (and this is not happening right now)

#6 Updated by Merritt Krakowitzer about 3 years ago

  • Status changed from Needs More Information to In Topic Branch Pending Review
  • Assignee set to Merritt Krakowitzer
  • Target version set to 2.7.x
  • Branch set to https://github.com/mkrakowitzer/puppet/tree/ticket%2F2.7.0%2F6371-solaris-lastchg-not-updating

#7 Updated by Jacob Helwig almost 3 years ago

  • Status changed from In Topic Branch Pending Review to Tests Insufficient
  • Assignee changed from Merritt Krakowitzer to Jacob Helwig

We should definitely have some testing around this to make sure we don’t accidentally regress on it in the future. I can probably get to it in the near future if it’s not something you have the time to get to, Merritt.

#8 Updated by Jacob Helwig almost 3 years ago

  • Description updated (diff)
  • Status changed from Tests Insufficient to In Topic Branch Pending Review
  • Assignee deleted (Jacob Helwig)
  • Branch changed from https://github.com/mkrakowitzer/puppet/tree/ticket%2F2.7.0%2F6371-solaris-lastchg-not-updating to https://github.com/jhelwig/puppet/tree/tickets/2.7.x/6371-update-lastchg-shadow-field-on-solaris

Merritt,

I’ve updated the tests, and made a small tweak to the original implementation to make it easier to test. If you have a chance & time, I’d appreciate it if you took a look at the updated branch. I’ve also opened pull request 173 to get the new tests reviewed by someone other than myself before merging into 2.7.x.

#9 Updated by Stefan Schulte almost 3 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release

merged into 2.7.x as commit:6ef1d3a

#10 Updated by Matthaus Owens over 2 years ago

  • Status changed from Merged - Pending Release to Closed
  • Target version changed from 2.7.x to 2.7.7

Released in 2.7.7

#11 Updated by Stefan Schulte over 1 year ago

  • Status changed from Closed to Re-opened
  • Target version deleted (2.7.7)
  • Affected Puppet version changed from 2.6.4 to 2.7.12

It looks like the original fix was reverted in commit:7900a66c9c75224d74535fd612298b50395fe86a

#12 Updated by Stefan Schulte over 1 year ago

  • Status changed from Re-opened to In Topic Branch Pending Review
  • Branch changed from https://github.com/jhelwig/puppet/tree/tickets/2.7.x/6371-update-lastchg-shadow-field-on-solaris to https://github.com/puppetlabs/puppet/pull/1640

#13 Updated by Stefan Schulte about 1 year ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version set to 3.3.0

#14 Updated by Stefan Schulte about 1 year ago

updated with information from merged pull request

#15 Updated by Andrew Parker 10 months ago

  • Status changed from Merged - Pending Release to Closed

Released in 3.3.0

#16 Updated by Andrew Parker 10 months ago

Released in 3.3.0

Also available in: Atom PDF