VMware Tools running scripts in Guest OS

Hello, I’m trying to integrate RancherOS with our current processes for VM template management and VM deployment on vSphere

We dont’t have PXE available throughout our networks so have built provisioning automation around Orchestrator which basically uses the same functionality as the invoke-vmscript PowerCLI cmdlet to run commands in the guest OS using VMware Tools. The thinking is we would have a RancherOS VM template, when a request is made the invoke-vmscript is run which overwrites /var/lib/rancher/conf/cloud-config.d/user_config.yml with correct IP details, hostname etc.

When running the cmdlet it throws an error which indicates an issue with PAM authentication. Is there any way to modify PAM in RancherOS, I’m unable to find a PAM conf file on the OS. SSH with the rancher user with the same password works fine.

[root@rancheros-template log]# tail -f /var/log/vmware-vmsvc.log
[Apr 10 23:56:24.057] [critical] [vmsvc] Auth_AuthenticateUser:440: PAM failure - Authentication failure (7)
[Apr 10 23:56:24.057] [ warning] [vix] VixToolsImpersonateUser: impersonation failed (3050)
[Apr 10 23:56:24.057] [ message] [vix] VixToolsCreateTempFile: opcode 181 returning 3050
[Apr 10 23:56:24.057] [ message] [vix] ToolsDaemonTcloReceiveVixCommand: additionalError = 4294967287

[root@rancheros-template log]# tail -f /var/log/secure
Apr 10 12:47:06 rancher vmsvc[682]: pam_unix(vmtoolsd:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Apr 10 23:21:18 rancher sudo: root : TTY=pts/0 ; PWD=/var/log ; USER=root ; COMMAND=/bin/bash
Apr 10 23:24:07 rancher vmsvc[682]: pam_unix(vmtoolsd:auth): check pass; user unknown
Apr 10 23:24:07 rancher vmsvc[682]: pam_unix(vmtoolsd:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Apr 10 23:37:37 rancher vmsvc[682]: pam_unix(vmtoolsd:auth): check pass; user unknown
Apr 10 23:37:37 rancher vmsvc[682]: pam_unix(vmtoolsd:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Apr 10 23:38:05 rancher vmsvc[682]: pam_unix(vmtoolsd:auth): check pass; user unknown
Apr 10 23:38:05 rancher vmsvc[682]: pam_unix(vmtoolsd:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Apr 10 23:56:21 rancher vmsvc[682]: pam_unix(vmtoolsd:auth): check pass; user unknown
Apr 10 23:56:21 rancher vmsvc[682]: pam_unix(vmtoolsd:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=

Thanks for your help.