Linux操作之——配置samba

1)配置

     vi /etc/samba/smb.conf

    

[share]
        comment = This is my shared folder.
        path = /home/share
        writable = yes
        browseable = yes
        guest ok = yes
        valid users=root

2)添加smb用户并设置密码

smbpasswd -a root

3)重启smb服务

service smb restart

4)检测selinux是否开启,需要关闭

[root@localhost home]# /usr/sbin/sestatus -v
SELinux status:                 enabled
[root@localhost home]# getenforce
Enforcing

5)关闭selinux

1、临时关闭,不需要重启机器:
setenforce 0           ##设置SELinux为permissive模式
                             ##1 则设置SELinux为enforcing模式
2、永久关闭重启机器生效:
修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
原文地址:https://www.cnblogs.com/yiyitong/p/8078991.html