基于centos7 安装Samba服务
安装Samba服务
yum -y install samba
查看yum源中samba版本
yum list | grep samba
查看samba的安装情况
rpm -qa | grep samba
修改samba配置
vim /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
[homes]
path =/mnt
;read only = No
writeable = yes
添加samba用户账号
smbpasswd -a root
禁用samba用户账号
smbpasswd -d root
启用samba用户账号
smbpasswd -e root
删除samba用户账号
smbpasswd -x root
查看samba拥有的用户
pdbedit -L
禁用防火墙
systemctl stop firewalld
禁止防火墙开机启动
systemctl disable firewalld
smb操作
systemctl start smb
systemctl stop smb
systemctl status smb
确保 setlinux 关闭
getenforce
vim /etc/selinux/config
SELINUX=disabled
设置后需要重启才能生效