Ubuntu 14.04 LTS: File Sharing With Samba

发现了国外人写的在Ubuntu 14.04系统与Win7系统之间共享文件夹的方法,以Samba Server Configuration为工具以 GUI 的形式来设置 Samba服务器,比命令行格式的配置服务器容易理解多了。特复制如下,原文地址:http://ubuntuhandbook.org/index.php/2014/05/ubuntu1404-file-sharing-samba/

This tutorial will show you how to install and configure Samba, a free software that allows you to share files, printers and other common resources across a network, in Ubuntu 14.04 Trusty Tahr.

1. Install Samba and the graphical configuration tool:

Press Ctrl+Alt+T on keyboard to open the terminal. When it opens, paste the command below and hit run:

sudo apt-get install samba samba-common system-config-samba python-glade2 gksu

2. Open Unity Dash, search for and open the samba configuration tool:

samba graphical configuration tool

3. When the tool opens, go to Preferences -> Server Settings.

Under Basic tab:

  • Workgroup. Same to your Windows Workgroup name (case-sensitive). In Windows 7, right-click Computer icon and go to Properties, there you’ll see Windows Workgroup name.
  • Description.This is the name of your computer as seen by Windows Users.

As it is not advisable to allow ‘Guests’ there should be no reason to change the ‘security’ settings tab unless you wish to do so.

Samba Server Settings

Finally click the OK button to save it.

(Optional) 4. Create a special user for network file sharing

Go to System Settings -> User Accounts -> Click unlock -> Click + (plus) icon -> Choose Standard account and type in names.

add-user

Remember to set a password to enable the new account.

5. Next go to Preferences -> Samba Users. Click Add User:

  • Unix Username: Select a user on this Ubuntu machine. You’ll access the shares from Windows machine with this user privilege. You can create a special user for file sharing by step 4
  • Windows Username: When accessing from Windows machine, you’ll be asked to type this username and the password below.
  • Samba password: When accessing from Windows machine, you’ll be asked to type the username above and this password.
  • Confirm Samba password.

Samba User Settings

Finally, restart Samba service and done!

sudo restart smbd && sudo restart nmbd

To share a folder, click the green + (plus) button in Samba Server Configuration tool and you can then easily set the directory, name, read/write permissions and access users.

Tips: If you set the Unix Username to current login user in step 5, you can easily share a folder by “Local Network Share” option in its context menu.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值