CentOS 7 samba server 配置,centossamba
CentOS 7 samba server 配置,centossamba
samba是linux上的文件共享服务软件,相当与Windows上的共享文件夹,当然也是要在同一网段上的。
当前用的版本是4.4.4,好吧!下面介绍怎么去安装配置它,here we go!
1. 安装:
[root@localhost ~]# yum install samba samba-client samba-common
2. 创建共享目录:
[root@localhost ~]# mkdir /home/SMBShare/
[root@localhost SMBShare]# chmod -R 777 /home/SMBShare/
[root@localhost SMBShare]# chown -R smbtest:smbgrp /home/SMBShare/
[root@localhost SMBShare]# chcon -t samba_share_t /home/SMBShare/
3. 创建可访问的用户:
[root@localhost SMBShare]# groupadd smbgrp
[root@localhost SMBShare]# useradd -G smbgrp smbtest
[root@localhost SMBShare]# smbpasswd -a smbtest
New SMB password:
Retype new SMB password:
Added user smbtest.
4. 修改配置文件并保存:
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos
security = user
map to guest = bad user
dns proxy = no
[mobile]
path = /home/SMBShare
valid users = @smbgrp
guest ok = no
writeable = yes
browsable = yes
5. 访问测试:
在windows上输入 \\centos,然后输入帐号:smbtest 密码:*********
评论暂时关闭