CentOS V7.4搭建samba服务环境

[root@localhost ~]# yum install samba samba-common
[root@localhost ~]# cd /home/
[root@localhost home]# sudo mkdir share
[root@localhost home]# chmod 777 share/
[root@localhost home]# vi /etc/samba/smb.conf
[root@localhost home]# cd share/
[root@localhost share]# touch /etc/samba/smbpasswd
[root@localhost home]# useradd python -m -d /home/python
[root@localhost home]# cd share/
[root@localhost share]# smbpasswd -a python
New SMB password:
Retype new SMB password:
Added user python.
[root@localhost etc]# systemctl start smb
[root@localhost etc]# systemctl enable smb
[root@localhost share]# systemctl restart smb
Created symlink from /etc/systemd/system/multi-user.target.wants/smb.service to /usr/lib/systemd/system/smb.service.
[root@localhost etc]# firewall-cmd --permanent --add-port=139/tcp
success
[root@localhost etc]# firewall-cmd --permanent --add-port=445/tcp
success
[root@localhost etc]# systemctl restart firewalld