Issue #9337 has been updated by David Thompson.

File init.pp added

Hi Nigel, thanks for looking at this.

Yes, I'm a puppet noob.  I was following the information at

http://docs.puppetlabs.com/references/stable/type.html#group-2

...which seemed to indicate that group memberships should be specified via the 
groups attribute of the user type, not the members attribute of the group type 
(see attachment).  If I specify the group membership as you have, yes, 
membership is updated properly.

So the rest of this becomes a (gentle) rant.  If the OS X provider can't update 
groups based on User => groups information, providing it there should either be 
ignored or cause an error. OTOH, it breaks the abstraction to say that for some 
architectures/providers the information must be in the Group => members 
attribute and for others it must be provided via User => groups.

Is there a way out of this so that I only have to have a single Users/Groups 
definition for all my architectures?

----------------------------------------
Bug #9337: OS X Lion group membership not updated
https://projects.puppetlabs.com/issues/9337

Author: David Thompson
Status: Needs More Information
Priority: Normal
Assignee: Nigel Kersten
Category: OSX
Target version: 
Affected Puppet version: 2.7.3
Keywords: 
Branch: 


Switching to puppet (2.7.3) for managing my OS X Lion systems, I'm finding 
group membership not being updated.  Couldn't find a dup for this, hope the 
information helps...

Starting out, user dt is not a member of group dt-grp:

<pre>
# dscl . read /groups/dt-grp | grep GroupMembership
GroupMembership:
</pre>

...Run puppet, says it adds to the group:

<pre>
# puppet agent --test --environment production
info: Caching catalog for cypress.keck.waisman.wisc.edu
info: Applying configuration version '1315332406'
notice: /Stage[main]/Users_test/User[dt]/groups: groups changed '' to 'dt-grp'
notice: Finished catalog run in 0.89 seconds
</pre>

...but the user still isn't part of the group:

<pre>
# dscl . read /groups/dt-grp | grep GroupMembership
GroupMembership:
</pre>

...Hrm, let's add the user manually...just like the puppet code does...

<pre>
# dseditgroup -o edit -n . -a dt dt-grp
# dscl . read /groups/dt-grp | grep GroupMembership
GroupMembership: dt
</pre>

...But puppet still tries to add the user to the group...

<pre>
# puppet agent --test --environment production
info: Caching catalog for cypress.keck.waisman.wisc.edu
info: Applying configuration version '1315332406'
notice: /Stage[main]/Users_test/User[dt]/groups: groups changed '' to 'dt-grp'
notice: Finished catalog run in 0.83 seconds
</pre>




-- 
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.

Reply via email to