I would like to run a shell provisioning script as a custom non-privileged user.
If I use something like this:
config.vm.provision "shell", path: "whoami.sh"
sudo su - bob
the user does not change to bob, it's root:
default: uid=0(root) gid=0(root) groups=0(root)
Why it doesn't work? It works fine when I ssh to my box.
I could switch to user bob when I use a script from the sync folder calling it inside of an inline block, but I would like to do it without putting anything into the sync folder.