linux|linux 配置samba服务器

samba为文件服务器,可实现Linux和windows的数据互发,非常常用和常见。
1.安装samba服务器
yum install -y samba samba-common(工具) samba-client(终端)
2.备份samba配置文件
cp /etc/samba/smb.conf/etc/samba/smb.conf.backup
3.配置samba配置文件
vi /etc/samba/smb.conf
内容如下:
【linux|linux 配置samba服务器】samba-client-4.7.1-6.el7.x86_64
[root@localhost log]# vim /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
[global]
workgroup = workgroup
security = user
map to guest = Bad User
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
[test123]
comment=this is a import files
path=/etc/test
public=yes
writable=yes
guest ok =yes
保存并关闭:wq
4.关闭网络防火墙和selinux
systemctl stop firewalld
setenforece 0
systemctl restart smb
5.在windows种查看结果
在任务栏输入\\192.168.x.x\test123

    推荐阅读