useradd -m -p 'PASSWORD' -U perforce
# Set up sudo
echo "%perforce ALL=NOPASSWD:ALL" > /etc/sudoers.d/perforce
chmod 0440 /etc/sudoers.d/perforce
# Need this as well
echo "%vagrant ALL=NOPASSWD:ALL" > /etc/sudoers.d/vagrant
# Setup sudo to allow no-password sudo for "sudo"
usermod -a -G sudo perforce
Minimal Ubuntu 16.04 Vagrant box for VMWare products.
I could not, for the life of me, figure out how to ditch the vagrant user for the packer build process. Keeping it for now, will remove during the vagrant setup.