1.安装samba
apt-get install samba
2.配置samba
vi /etc/samba/smb.conf
root@cubietruck-plus:~# vi /etc/samba/smb.conf
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
# - When such options are commented with ";", the proposed setting
# differs from the default Samba behaviour
# - When commented with "#", the proposed setting is the default
# behaviour of Samba but the option is considered important
# enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
#======================= Global Settings =======================
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
# wins support = no
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z
3.在smb.conf文件中增加如下格式的共享文件
[cubieboard] #共享名称
comment = cubieboard files #共享描述
path = /mnt/download #共享的路径
browseable = yes #设置为可被浏览到
writable = yes #可写入
creat mask = 0777 #创建文件的权限
directory mask = 0777 #创建路径的权限
valid users = root #可访问该共享的用户
4.添加samba用户
使用SMB服务的smbpasswd命令给系统用户设置SMB密码
smbpasswd -a root
5.重新加载smb服务
root@cubietruck-plus:~# service samba reload