su user -c "..."
used to work well in alpha 4, such as over ssh, for running privileged commands. Now in nightly, su requires a full pseudo terminal environment or else exits with a message like:
su: Refused login. Setting up environment failed: Invalid Argument
This is annoying. As a workaround, Packer can synthesize a pty with ssh_pty: true
, though is is not ideal.