Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-4692

Puppet has no designated default user or group providers for Linux

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • PUP 3.8.1, PUP 4.1.0
    • None
    • None
    • Linux.

    • Reviewed

    Description

      Linux has no designated default provider for the user or group types. This means that a stray binary in the PATH or a poorly written module can break account management.

      Reproduction Case

      • Install a PE 3.8 agent on a Debian or RedHat system.
      • Create a bogus pw binary:

      tee 'EOF' > /bin/pw
      #! /bin/bash
      exit 1
      EOF
       
      chmod +x /bin/pw
      

      • Attempt to use Puppet to create a new user or group.

      Outcome

      Puppet fails to manage user and group resources:

      # /opt/puppet/bin/puppet resource user foo ensure=present
      Error: Could not create user foo: Execution of '/bin/pw useradd foo' returned 1:
      Error: /User[foo]/ensure: change from absent to present failed: Could not create user foo: Execution of '/bin/pw useradd foo' returned 1:
      user { 'foo':
        ensure => 'absent',
      }
       
      # /opt/puppet/bin/puppet resource group foo ensure=present
      Error: Could not create group foo: Execution of '/bin/pw groupadd foo' returned 1:
      Error: /Group[foo]/ensure: change from absent to present failed: Could not create group foo: Execution of '/bin/pw groupadd foo' returned 1:
      group { 'foo':
        ensure => 'absent',
      }
      

      Expected Outcome

      Puppet defaults to using the useradd and groupadd providers on Linux systems, unless there is a compelling reason to use something different.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chuck Charlie Sharpsteen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support