| VirtualBox Host OS: | Windows 10 Pro |
|---|---|
| VirtualBox Guest OS: | Ubuntu 16.04 LTS |
- Click
Start> TypeTurn Windows features on or off - Within
Windows Features> Ensure bothSMB 1.0/CIFS File Sharing SupportandSMB Directare enabled/checked - Click
OK - Restart Windows if prompted
- Click
Start> Typegpedit.mscto open the Local Group Policy Editor - Within
Local Group Policy Editor> Navigate toComputer Configuration > Administrative Templates > Network > Lanman Workstation> Double-clickEnable insecure guest logons> SelectEnabled> ClickOK - Close the Local Group Policy Editor.
- Start
Oracle VM Virtualbox Manager(VirtualBox GUI) - Select the Guest Machine > Click
Settings - Select
Network>Adapter 1tab > SetAttached to:to beBridged Adapter - Click
OK
$ sudo mkdir /vm-files $ sudo chown $USER:$USER /vm-files $ sudo chmod 777 /vm-files
$ sudo apt-get update -y $ sudo apt-get install -y samba $ sudo smbpasswd -a $USER
$ sudo cp -pf /etc/samba/smb.conf /etc/samba/smb.conf.bak $ sudo nano /etc/samba/smb.conf
Add the following to the bottom of the file:
[vm-files] path = /vm-files available = yes valid users = <YOUR USERNAME HERE> read only = no browseable = yes public = yes writable = yes map archive = no create mask = 664 directory mask = 775 [global] client min protocol = SMB3 client max protocol = SMB3 restrict anonymous = 2 encrypt passowrds = true
$ testparm /etc/samba/samba.conf $ sudo service smbd restart $ sudo service smbd status
Since we configured the VirtualBox adapter as a Bridged Adapter, your Guest IP should be the same subnet as your Host IP. This is likely 192.168.x.x.
$ ipconfig
- Open a
Windows Explorerwindow > SelectThis PC - Left/Alt-Click > Select
Add a network location> ClickNext> ClickChoose a custom network location> Enter\\<YOUR GUEST IP ADDRESS>\vm-files> ClickNext> ClickOK
The Samba fileshare will now appear under the Network locations section on the This PC page within Windows Explorer.
- Samba setup: https://askubuntu.com/a/820550
- Windows 10 group policy setting: https://superuser.com/a/1438512