Install Samba:

sudo yum -y install samba

Start Samba:

sudo systemctl start smb nmb

Restart Samba:

sudo service smb restart

Make smb start on boot:

sudo systemctl enable smb.service
sudo systemctl enable nmb.service

Configure samba:

sudo vim /etc/samba/smb.conf
[share]
    path = /home/lane
    public = yes
    writeable = yes
    guest ok = yes
    create mode = 0777
    directory mode = 0777
    valid users = root, lane
    available = yes

Configure firewall:

sudo firewall-cmd --permanent --add-port=139/tcp
sudo firewall-cmd --permanent --add-port=445/tcp
sudo firewall-cmd --permanent --add-service=samba
sudo systemctl restart firewalld.service

Add user:

smbpasswd -a root
smbpasswd -a lane

Close Selinux:

  • stop Selinux temporary: setenforce 0

  • stop Selinux permanently: vim /etc/selinux/config, find and set:

SELINUX=disabled
2018-06-18 15:3232