Issue #11042 has been updated by Neil Hemingway.
I've just pushed https://github.com/nhemingway/puppet/commit/b5b292d09ed283a0e2930ee7cfedf8fa64108a8c. Is this the kind of thing you were looking for? Incidentally, I now notice that puppet is spamming the log because @should=<groupname>, whereas is=<gid>, and it thinks they don't match. I've investigated a couple of ways of teaching puppet that they do match, but I'm not convinced I've got the best place. The first solution I tried was to convert the gid back to the groupname in Puppet::Type::user using is_to_s and should_to_s. My second try replaced the call of Puppet::util.gid with one to a new function provider.group2id, but: (a) this would also require adding support functions to the other providers and I've no means of testing those (b) I wasn't sure whether it was a design decision to indirect through posix to ensure that not only does the group exist in ldap, but that the local machine can also see it. ---------------------------------------- Bug #11042: Inconsistent translation of group names to numbers when creating users in ldap https://projects.puppetlabs.com/issues/11042#change-64033 Author: Neil Hemingway Status: Accepted Priority: Normal Assignee: Neil Hemingway Category: LDAP Target version: 2.7.x Affected Puppet version: 2.7.1 Keywords: LDAP provider user group Branch: Puppet::Provider::User::Ldap translates group names to numbers when modifying an existing user (using gid=), but not when creating a new one. I believe this to be because gid= is not called when creating a new user due to the prefetch approach. I have a couple of options for patches both of which seem to achieve the correct result, but (being new to the internals of puppet), I'm not sure whether I've "fixed" the problem in the best place, or whether there is somewhere more appropriate. I've cloned the repo and will be pushing my patches to github under two different branches for you to compare/comment/rip to shreds/suggest improvements etc. -- 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.
