Linux操作之——配置samba

论坛 期权论坛 脚本     
匿名技术用户   2021-1-7 09:42   187   0

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

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP