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
- relates to
-
PUP-4693 The pw provider for users and groups should be confined to freeBSD
-
- Closed
-