Issue #12716 has been updated by Stefan Schulte. Status changed from Unreviewed to Rejected
Hi Henry, in your first example you create a jbossas user account with the gid set jbossas. The gid does refer to the primary group membership and is stored in the `/etc/passwd` while. The `/etc/group` file does only specify secondary group memberships so your exec is not needed and puppet works as expected here. You can confirm this be running `/bin/groups jbossas` on the commandline. Eventhough you don't see the membership expressed in `/etc/group` you will see the `jobossas` group in the output. On a sitenote: You can also ommit the `require => Group['jbossas']` in your user definition since puppet will create an implicit requirement between the user and the group. Closing the ticket now. ---------------------------------------- Bug #12716: user resource does not assign proper group/gid https://projects.puppetlabs.com/issues/12716#change-55374 Author: Hendy Irawan Status: Rejected Priority: Normal Assignee: Category: Target version: Affected Puppet version: Keywords: Branch: The following does not work as expected: # Create group, user, and home folder group { jbossas: ensure => present } user { jbossas: ensure => present, managehome => true, gid => 'jbossas', require => Group['jbossas'], comment => 'JBoss Application Server' } When applied, the above only creates the jbossas group and jbossas user, but the jbossas group's members is empty. I have to add additional workaround for this: # workaround for Puppet bug about user not added to group exec { '/usr/sbin/adduser jbossas jbossas': unless => "/bin/grep 'jbossas.*jbossas' /etc/group", require => [ Group['jbossas'], User['jbossas'] ] } -- 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.
