centos7下配置samba,win10访问

1 yum install -y samba samba-client

更改配置

 1 [root@abcd mnt]# cat /etc/samba/smb.conf
 2 [global]
 3         workgroup = WORKGROUP 
 4         security = user
 5 
 6         passdb backend = tdbsam
 7 
 8         printing = cups
 9         printcap name = cups
10         load printers = yes
11         cups options = raw
12 
13 [abcd]
14         comment = dirs
15         valid users = abcd 
16         browseable = Yes 
17         path = /mnt
18         read only = Yes 
19         inherit acls = Yes
20 
21 [printers]
22         comment = All Printers
23         path = /var/tmp
24         printable = Yes
25         create mask = 0600
26         browseable = No
27 
28 [print$]
29         comment = Printer Drivers
30         path = /var/lib/samba/drivers
31         write list = root
32         create mask = 0664
33         directory mask = 0775

然后就是添加用户abcd了

1 smbpasswd -a abcd

然后要记得关闭防火墙,不然看不到目录,虽然能访问。也可能提示没有权限。

1 setenforce 0

启动服务

1 service smb restart

以上。 

 

posted @ 2018-01-12 01:05  linyx  阅读(742)  评论(0编辑  收藏  举报