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

gpasswd fails silently #101

Open
tnail opened this issue Oct 17, 2019 · 2 comments
Open

gpasswd fails silently #101

tnail opened this issue Oct 17, 2019 · 2 comments

Comments

@tnail
Copy link

tnail commented Oct 17, 2019

I've got a system (RHEL 7.6, Open Source puppet 5.5, Accounts branch 2.0 ) that is trying to add a non-existent user (yeh, I need to fix the hiera data...) to a group, via gpasswd. And this fails, but doesn't actually emit an error:

Debug: Executing: '/bin/gpasswd -a va-user appadmin'
Debug: Success: /bin/gpasswd -a va-user 'appadmin'
Notice: /Stage[main]/Accounts/Accounts::Group[appadmin]/Group[appadmin]/members: members changed 'user1,user2,user3,user4' to 'user1,user2,user3,user4,va-user'
Debug: /Stage[main]/Accounts/Accounts::Group[appadmin]/Group[appadmin]: The container Accounts::Group[appadmin] will propagate my refresh event
Debug: Accounts::Group[appadmin]: The container Class[Accounts] will propagate my refresh event

If I try this command from the CLI on the system, I get an exit code of "3" and the command returns:

[/root]# gpasswd -a va-user appadmin
gpasswd: user 'va-user' does not exist
[/root]# echo $?
3

Is there any way I can get this to report as a failure, so I can try to see what's happening in my environment?

Cheers,

-=Tom Nail

@deric
Copy link
Owner

deric commented Oct 30, 2019

@tnail Just to be on the same page, you're config looks basically like this, right?

accounts::groups:
  appadmin:
    ensure: present
    members: ['user1', 'user2', 'user3', 'user4']
accounts::users:
  va-user:
    groups: ['appadmin']

Can you see in the logs any attempt to create the user account va-user before adding it to the group?

Which Puppet version do you exactly use? I've noticed broken tests with Puppet 5.5.17, but I'm not sure what's the cause.

@tnail
Copy link
Author

tnail commented Oct 30, 2019 via email

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

2 participants