Skip to content

Instantly share code, notes, and snippets.

@synackme
Created March 24, 2018 19:07
Show Gist options
  • Save synackme/2230c6dd069429b8faba313b25cf6d42 to your computer and use it in GitHub Desktop.
Save synackme/2230c6dd069429b8faba313b25cf6d42 to your computer and use it in GitHub Desktop.
Kali - Adding Support for Shared Folders When Using open-vm-tools
# As of Sept 2015, VMware recommends using the distribution-specific open-vm-tools (OVT)
# instead of the VMware Tools package for guest machines. To install open-vm-tools in Kali,
# first make sure you are fully updated, and then enter the following:
cat <<EOF > /usr/local/sbin/mount-shared-folders
#!/bin/bash
vmware-hgfsclient | while read folder; do
vmwpath="/mnt/hgfs/\${folder}"
echo "[i] Mounting \${folder} (\${vmwpath})"
mkdir -p "\${vmwpath}"
umount -f "\${vmwpath}" 2>/dev/null
vmhgfs-fuse -o allow_other -o auto_unmount ".host:/\${folder}" "\${vmwpath}"
done
sleep 2s
EOF
chmod +x /usr/local/sbin/mount-shared-folders
# If you wish to make it a little easier, you can add a shortcut to the desktop
# (and allow the script to be executed upon double clicking if you are you are using GNOME):
ln -sf /usr/local/sbin/mount-shared-folders /root/Desktop/mount-shared-folders.sh
gsettings set org.gnome.nautilus.preferences executable-text-activation 'ask'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment