centos7 samba配置

root权限安装软件

yum -y install samba samba-client

修改配置文件

cd /etc/samba/
mv smb.conf smb.conf.origin

直接复制到smb.conf

[global]
diplay charset = utf8
unix charset = gbk
dos charset = gbk
workgroup = WORKGROUP
#netbios name = work
server string = uc
security = user
[liuhuan]
comment = liuhuan
path=/home/liuhuan
create mask = 0664
directory mask = 0775
writable = yes
read only = no

添加用户和密码

useradd liuhuan
smbpasswd -a liuhhuan

然后启动smbd和nmbd

smbd
nmbd
#查看当前samba用户
pdbedit -L

#查看samba服务
service smb status
service smb start 
service smb stop
service smb restart 
service smb reload 

如果连接不上

重启samba服务
service smb restart 

检查防火墙是否关闭
systemctl stop firewalld.service

检查setlinux关闭
setenforce 0

http://www.cnblogs.com/whiteyun/archive/2011/05/27/2059670.html

你可能感兴趣的:(linux)