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: in openpam_load_module(): no
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'
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:
Date: Sun Jun 7 12:53:17 UTC 2015
New revision: 388693
emulators/open-vm-tools: Fix pam issue
While here, fix a plist issue
Fix committed, thanks. The caveats you mention are normal for vmrun and how it's documented to work, as far as I know.