标签:available 输入密码 only write 本地安全策略 系统用户 ima path ali
首先关闭防火墙
service iptables stop
另外关闭SELINUX的强制模式
setenforce 0
查看已经按照samba rpm包
rpm -qa | grep samba
通常为了保持环境纯净,都是先现在原来的安装包
卸载samba
rpm -e --nodeps xxx
yum安装samba
yum install samba samba-client samba-swat
[myshare]
comment = this is my share
path = /home/liuguanghai/
valid user = liuguanghai
read only = no
writeable = yes
browseable = yes
available = yes
printable = no
write list = +staff
好了,保存退出:wq!
在本地检测是否分享成功:
输入命令:smbclient -L \\127.0.0.1 -U xxx
1、出现类似如下结果证明成功:

2、如何出现如下字样:
$ smbclient -L \\127.0.0.1 -U test Enter berbiey‘s password: session setup failed: NT_STATUS_LOGON_FAILURE
smbpasswd -a test #在samba服务器中添加一个用户名是test用户 输入密码:
以上配置完成后要重启samba服务才能生效,重启命令如下:
systemctl restart smb.service
systemctl restart nmb.service
systemctl enable smb.service
systemctl enable nmb.service
systemctl status smb
#临时关闭
systemctl stop firewalld
#禁止开机启动
systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
标签:available 输入密码 only write 本地安全策略 系统用户 ima path ali
原文地址:https://www.cnblogs.com/liuguanghai6455/p/11827138.html