Windows7 和 Unbutu11.10 之间的文件共享配置

原文链接:


Filesharing Between Windows and Ubuntu 11.10 (Oneiric Ocelot)

This short guide shows you how to enable file sharing between Windows and Ubuntu 11.10 machines easily. We have covered a lot on this topic already and this is just a continuation. Our goal today is to have users on either machine access and edit files and folders on the other machine. For all this to work, we’ll be configuring our systems to allow file sharing using the same protocol. For Ubuntu systems, Samba will be used to allow both systems to share files and folders.

 

Objectives:

  • Add Ubuntu systems to Windows Workgroup
  • Configure Windows system to allow file sharing
  • Add Ubuntu users to Samba user database
  • Access files and folders from either system

 

Our first objective is to add Ubuntu systems to Windows’ Workgroup. To find out which workgroup Windows belongs, type the command below:

net config workstation

share_oneiric

 

Take notes of Windows workgroup name and continue below.

 

Next, open the terminal in Ubuntu and type the command below to install ‘Samba Config’

 

share_oneiric_1

 

Then open ‘Dash’ and select ‘Samba’

share_oneiric_2

 

When Samba opens, select ‘Preferences –> Server Settings’

 

share_oneiric_3

 

Then enter the Windows workgroup name here and click ‘OK’

 

share_oneiric_4

 

After that, logon to Windows and in the search box, type ‘Manage advanced sharing settings’

 

share_oneiric_5

 

From there. enable ‘file and printer sharing’ for Home and Work networks.

 

share_oneiric_6

 

When all computers are restarted you should begin to see each machine in the workgroup on all systems that are member of the group.

 

share_oneiric_7

 

Now all you need to do is create shares (resources) on each system to share.

 

Things to remember:

 

  • Make sure the admin account on the Windows machines has password assigned.
  • You must share at least one file or folder on the Windows machine in order to open the Windows shares from Ubuntu. I had a problem when accessing the Windows shares from Ubuntu. It displays error Cannot list shares from server’
  • Add your Ubuntu account to Samba user database in order to access Ubuntu shares from Windows machines.

 

In order to access Ubuntu shares from Ubuntu, you must add your Ubuntu account to Samba user database. To do that, run the command below:

sudo smbpasswd USERNAME -a

share_oneiric_8

 

That’s all it. Now you can go back to each system and begin sharing files. In Ubuntu, open Samba and click ‘Add’ to add shares (folders) so Windows machines can access it.


对于域账号共享模式下的问题解决:
在Ubuntu访问windows network出现domain名称后,弹出错误:Unable to mount location...
解决办法如下:

I've had very good results in mixed network environments (window-ubuntu) with this method:


1) Press alt+F2 >> type gksu gedit /etc/nsswitch.conf


2) Look for this line: hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4


3) Add "wins" so it looks like this: hosts: files mdns4_minimal [NOTFOUND=return] wins dns mdns4


4) Install the "winbind" package: sudo apt-get install winbind (or via software center or synaptic)


5) Reboot or restart your network


重启Ubuntu 之后,一切正常。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值