环境:
1.虚拟机:VMware® Workstation 10.0.7 build-2844087
2.Ubuntu版本为14.04
安装步骤:
1、安装 Samba 和图形配置工具
使用 Ctrl+Alt+T 打开终端,并通过如下命令进行安装
sudo apt-get install samba samba-common system-config-samba python-glade2 gksu
注意:本来打算在Ubuntu软件中心中直接安装samba,但是发现安装后在应用程序中未找到安装的samba,原因未知,所以我使用了上面的命令行来进行安装。2、配置samba服务器
添加samba共享,界面如下:
在服务器配置中的验证模式下一定要选择“用户”,不能选择“共享”。不能选择“共享”是因为我经过测试发现,在选择“共享”后下次就不能正常打开samba服务器设置界面了,我怀疑这是samba的一个BUG,而且用户验证模式选择用户是不够的,我们还得在/etc/samba/smb.conf中的“security = user“后面加上“map to guest = Bad User“
解释:The remote user name will be compared to the one found in the samba password database and if it doesn't find a match it will be tagged a "Bad User" and mapped to the guest account. I should have also noted that is you don't add "map to guest = Bad User" it defaults to "map to guest = Never".
做完以上后reboot系统。
3.chmod 777 /home/share 使该文件夹所有用户都可以使用。
4.在win7系统下首先打开运行对话框,并在里面输入虚拟机中Ubuntu的IP地址,然后接着进入share文件夹。
5.做第四步是为了在网络下显示虚拟机中的share文件夹,接着要做的就是在win7下映射网络驱动器:
这样就可以在win7的X硬盘驱动器下使用share目录进行文件共享了。