root@vagrant-ubuntu-trusty-64:~# sudo -u car -H /vagrant/install_car.sh
sudo: unable to execute /vagrant/install_car.sh: No such file or directory
root@vagrant-ubuntu-trusty-64:~# ls -la /vagrant/install_car.sh
-rwxrwxrwx 1 vagrant vagrant 146 Apr 21 07:44 /vagrant/install_car.sh
root@vagrant-ubuntu-trusty-64:~#
# === Another try:
root@vagrant-ubuntu-trusty-64:~# sudo -u car -H bash /vagrant/install_car.sh
: No such file or directoryne 3: /home/car/.nix-profile/etc/profile.d/nix.sh
/vagrant/install_car.sh: line 5: nix-env: command not found
root@vagrant-ubuntu-trusty-64:~# What is surprising is both these files exist?
root@vagrant-ubuntu-trusty-64:~# cat /etc/passwd | grep root
root:x:0:0:root:/root:/bin/bash
root@vagrant-ubuntu-trusty-64:~# cat /etc/passwd | grep car
car:x:1002:1002::/home/car:/bin/bash