Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
PUP 6.8.0
-
Ubuntu 16.04 (amd64)
-
Coremunity
-
Platform Core KANBAN
-
Needs Assessment
-
Bug Fix
-
Puppet could not execute commands with non-string arguments if the command was also marked as sensitive and the arguments were passed as an Array to the `execute` method. The issue is fixed for all providers, including the useradd provider.
-
Needs Assessment
Description
Puppet Version: 6.8.0
Puppet Server Version: 6.4.0
OS Name/Version: Ubuntu 18.04
Creating a user specifying the UID (uses useradd provider automatically):
user { 'test': ... uid => 123,} |
Desired Behavior:
User is created with uid 123.
Actual Behavior:
Error: Could not create user test1: Execution of '[redacted]' returned 1: Error: Could not execute posix command: no implicit conversion of Integer into String
Debugging showed the command as:
["/usr/sbin/useradd", "-c", "Test1", "-g", "users", "-d", "/home/test1", "-p", "removed", "-s", "/bin/tcsh", "-u", 123, "-m", "test1"]
So I'm assuming the 123 argument there should be quoted.
Suspect this is to do with this change, but can't see why: