In FreeBSD, the following vmrun commands fail to operate due to a PAM-related permissions issue: copyFileFromHostToGuest, runProgramInGuest, runScriptInGuest. Symptom: If I try to use vmrun with e.g. a passwordless account, I get the following log message: %%% Nov 27 16:49:11 myhost vmsvc[9911]: in openpam_load_module(): no pam_unix2.so found %%% Root cause: The PAM configuration installed with the port refers to non-existent PAM modules. Resolution: Remove the non-existent PAM modules from the configuration installed for vmtoolsd. %%% sed -i.orig -e '/pam_unix2/d;/pam_unix_auth/d;/pam_unix_acct/d' /usr/local/etc/pam.d/vmtoolsd %%% With this change, vmrun commands will work with the following caveats at the host: - The runScriptInGuest command takes the content -- not a path -- of a script to be executed with /bin/sh. - vmrun logs error messages to stdout, so they need to be parsed for guest command return codes.
A commit references this bug: Author: swills Date: Sun Jun 7 12:53:17 UTC 2015 New revision: 388693 URL: https://svnweb.freebsd.org/changeset/ports/388693 Log: emulators/open-vm-tools: Fix pam issue While here, fix a plist issue PR: 200637 Changes: head/emulators/open-vm-tools/Makefile head/emulators/open-vm-tools/files/patch-scripts_linux_pam.d_vmtoolsd head/emulators/open-vm-tools/pkg-plist
Fix committed, thanks. The caveats you mention are normal for vmrun and how it's documented to work, as far as I know.