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

Puppet has no designated default user or group providers for Linux

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.8.1, PUP 4.1.0
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      Linux.

    • CS Priority:
      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

              jsd-sla-details-panel

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support