1

I installed Puppet 5 on an CentOS 7 machine from https://yum.puppet.com/puppet/. The installation was successful and I can run puppet apply for a simple manifest like this one:

file {'/tmp/example-ip':
    ensure  => present,
    mode    => '0644',
    content => "Here is my Public IP Address: ${ipaddress_eth0}.\n",
}

But if I try to create a user and group via Puppet I always get the following erorr messages:

Error: Could not find a suitable provider for user
Error: Could not find a suitable provider for group

Here is the manifest which produces these errors:

group { 'team-berlin':
  ensure => present,
}

group { 'team-london':
  ensure => present,
}

The types user and group should be present according to the output of puppet resource:

$ puppet resource --types
...
file
filebucket
group
host
...
tidy
user
...

Why do I get this error messages? What did I miss?

  • 2
    Please show the user/group definition from your manifest – deagh Aug 6 '17 at 9:10
  • I added it to the question. – Oliver F. Aug 6 '17 at 12:22
  • 1
    Did you run 'puppet apply' as root? Permission problem (for none root user) can trigger such issues. – deagh Aug 6 '17 at 14:31
  • Thanks. I feel so stupid. Can you post your hint as answer? – Oliver F. Aug 6 '17 at 17:19
1

To use resources like user/group (which depend on binaries like useradd/groupadd) you must run puppet apply as root or with root-privileges.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.