Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unwanted created groups with same gids as uids #87

Open
dfrise opened this issue Oct 24, 2017 · 2 comments
Open

unwanted created groups with same gids as uids #87

dfrise opened this issue Oct 24, 2017 · 2 comments

Comments

@dfrise
Copy link

dfrise commented Oct 24, 2017

Hi,
First thanks for the awesome module that we use since we started using hiera.

This issue appeared since we migrated from 1.5.2 to 1.5.3.
Assuming following common.yaml extract:

accounts::groups:
  ci:
    gid: '10010'
accounts::users:
  testci:
    uid: '1003'
    primary_group: 'ci'
    populate_home: true

Which means we want the testci user to belong to the primary group ci.
After running the first puppet run on a new node, the testci user gets created:

# grep testci /etc/group
testci:x:1003:
# id testci
uid=1003(testci) gid=1003(testci) groups=1003(testci)

Hopefully this does not affect already configured nodes.

Uncommenting the #141 line in user.pp seems to fix this:

140   User<| title == $username |> {
141     #gid       => $real_gid,
142     comment    => $comment,
143     managehome => $managehome,
144     home       => $home_dir,
145   }

Was this intentional (are we missing something)?
Thanks,
Dominique

@crayfishx
Copy link
Contributor

@deric I'm also seeing exactly the same behaviour as @dfrise and uncommenting this line also works for me - can you confirm why this line is commented out? It appears to nullify the option of primary_group....

@Elbandi
Copy link

Elbandi commented Jul 23, 2019

bug still exists:

accounts::users:
  elbandi:
    comment: "elbandi"
    uid: 1013
    primary_group: 'users'
    groups: ["users"]

after run puppet apply:

Notice: /Stage[main]/Accounts/Accounts::User[elbandi]/User[elbandi]/ensure: created
Notice: /Stage[main]/Accounts/Accounts::Group[users]/Group[users]/members: members changed '' to 'elbandi'

and

# id elbandi
uid=1013(elbandi) gid=1013(elbandi) groups=1013(elbandi),100(users)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants