ubuntu14.04与win7相互共享



samba是Linux系统上的一种文件共享协议,可以实现Windows系统访问Linux系统上的共享资源,现在介绍一下如何在Ubuntu 14.04上安装和配置samba,以及ubuntu上挂载windows共享盘的方法。此方法仅适用于ubuntu,windows两台不同的电脑,在局域网下。如果是windows与windows下虚拟机中的ubuntu(同一台电脑),在虚拟机中设置即可。

1. 在ubuntu下打开终端,并输入:sudo apt-get update

2. 安装samba服务,在终端中输入:sudo apt-get install samba samba-common进行安装

3. 建立你想共享出去的文件夹,在终端中执行:mkdir /home/folder_name   (folder_name是你想共享出去的文件夹名称)

4. samba安装好之后,会在/etc/samba/文件夹下有一个smb.conf文件,此文件是samba的一个配置文件。

5. 编辑此文件,用gedit或者vi都可以,在终端中执行:sudo gedit /etc/samba/smb.conf 或者执行:sudo vi /etc/samba/smb.conf

6. 在其中添加一行:   security = user ,添加这一行的目的在于,只有输入账号和密码才能访问此文件夹。添加的位置如下:

#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000
   security = user
# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
#   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following pa
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值