Centos7.4文件服务samba

前端之家收集整理的这篇文章主要介绍了Centos7.4文件服务samba前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

安装

  1. yum install samba

编辑配置文件

  1. cp /etc/samba/smb.conf /etc/samba/smb.conf.bak 备份
  2. vi /etc/samba/smb.conf
  3.  
  4. 文件内容
  5. [global]
  6. workgroup = LinuxSamba
  7. security = user
  8. [Home]
  9. path = /home
  10. browsable = yes
  11. writable = yes

添加用户(这里添加root用户),并设置密码

  1. smbpasswd -a root

开机启动

  1. systemctl enable smb.service
  2. 启动
  3. systemctl start smb.service

设置防火墙

  1. firewall-cmd --permanent --zone=public --add-service=samba
  2. firewall-cmd --reload

如果登录后,不可写文件,需设置目录文件的安全环境

  1. chcon -t samba_share_t /home

猜你在找的CentOS相关文章