centos7安装samba

891 阅读1分钟

关闭防火墙

[root@localhost ~]# systemctl stop firewalld.service 
[root@localhost ~]# systemctl disable firewalld.service

关闭selinux

image.png

安装

[root@localhost ]# yum install samba

配置服务

安装后会生成/etc/samba目录,屏蔽[homes],添加workspace

image.png

image.png

添加账户

[root@localhost conf.d]# groupadd samba
[root@localhost conf.d]# useradd -m -s /sbin/nologin -g samba smbuser
[root@localhost conf.d]# smbpasswd -a smbuser

查看账户是否成功

[root@localhost samba]# cat /etc/group

image.png

[root@localhost samba]# cat /etc/passwd

image.png

启动、查看smb服务

[root@localhost samba]# systemctl start smb 
[root@localhost samba]# systemctl status smb

image.png

配置nginx查看

image.png