add smb capability to linux hosts
This uses samba net usershare command to share the current directory as an SMB share which can be used by Windows guests.
On a Ubuntu host (tried with 18.04), you need to install samba and configure your user password, e.g.:
sudo apt-get install -y samba smbclient
sudo systemctl status smbd
sudo smbpasswd -a $USER # use your current password.
samba --version
smbclient --version
And, as an example, share a directory (these commands are roughly what the plugin is using when you do a vagrant up, but are placed here as an example on how to test the setup manually):
mkdir $PWD/$USER-smb-share
echo hello world >$PWD/$USER-smb-share/hello-world.txt
net usershare add $USER-smb-share $PWD/$USER-smb-share 'Example Share' Everyone:R,$USER:F
net usershare info $USER-smb-share
net usershare list
#net usershare delete $USER-smb-share
sudo net status shares
sudo smbstatus --shares
sudo smbclient --list localhost --no-pass
Fixes #11016
@chrisroberts @briancain is anything missing or can we merge this PR?
What is the hold up with this PR? It's been hanging around for nearly 4 years, all checks pass, it closes an Open Issue that's been hanging around for nearly 3 years!?!? It also fixes a feature gap between Windows, Mac OSX, and Linux hosts!
@rgl is attempting to deploy a commit to the HashiCorp Team on Vercel.
A member of the Team first needs to authorize it.