您的位置:首页 > 运维架构 > Linux

配置samba服务--centos7.x

2017-08-13 17:33 267 查看
安装 samba rpm包

samba.x86_64 : Server and Client software to interoperate with Windows machines

查看selinux 

getenforce

临时关闭selinux

setenforce 0

永久关闭selinux ,修改/etc/selinux/config配置文件中SELINUX 为 disable

SELINUX=disabled

关闭防火墙

systemctl stop firewalld.service

禁止防火墙开机自启动
systemctl disable  firewalld.service
配置samba共享目录
 [samba_share_for_windows]

 comment = Network Logon Service

 path = /home/samba_share

 writable = yes

 browseable = yes

 guest ok = yes
smbpasswd
来添加Samba用户,并设置密码。原理是通过读取/etc/passwd文件中存在的用户名


[root@localhost
samba_share]# smbpasswd -a root

New SMB password:

Retype new SMB password:

[root@localhost samba_share]#

增加samba账户对共享目录的而访问权限
[root@localhost
samba_share]# chown root:root /home/samba_share

重启samba服务即可
systemctl
restart smb
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  samba