vagrant icon indicating copy to clipboard operation
vagrant copied to clipboard

add smb capability to linux hosts

Open rgl opened this issue 7 years ago • 3 comments

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

rgl avatar Jun 24 '18 13:06 rgl

@chrisroberts @briancain is anything missing or can we merge this PR?

MaxPeal avatar Mar 10 '22 23:03 MaxPeal

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!

salderma avatar Mar 29 '22 13:03 salderma

@rgl is attempting to deploy a commit to the HashiCorp Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Oct 23 '22 11:10 vercel[bot]