1. 安装:dnf install samba (在较新版本的Fedora中已用dnf指令代替了yum指令)
2. 配置:配置文件在/etc/samba下,smb.conf,可以在原有文件的基础上修改,不过根据本人经验,还是从新开一个比较好
!在无论是新开还是修改原文件,请务必先备份conf文件
cp smb.conf smb.conf.bak
在新建的文件中输入以下代码。[homes]是各个用户自己的文件夹,[share]是共享的文件夹的名称。
在Samba 4.0之后的版本中不再支持security = share选项,所以请使用security = user
[global]
workgroup = WORKGROUP
log file = /var/log/samba/log.%m
max log size = 50
load printers = no
security = user
passdb backend = tdbsam
[homes]
comment = home directories
browseable = no
writable = yes
create mode = 0777