About: Samba has provided secure, stable and fast file and print services

Step1. Install the packages

yum install samba samba-common samba-client -y

Step2. Check the windows workgroup

net config workstation

Step3. Take backup main configuration file

mv /etc/samba/smb.conf /etc/samba/smb.conf.default

Step4. Create folder and provide permission and allow on selinux

mkdir -p /srv/samba/anonymous
chmod -R 0755 /srv/samba/anonymous
chown -R nobody:nobody /srv/samba/anonymous
chcon -t samba_share_t /srv/samba/anonymous

Step5. Configure the file

vi /etc/samba/smb.conf

[global] workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos
security = user
map to guest = bad user
dns proxy = no
path = /srv/samba/anonymous
browsable =yes
writable = yes
guest ok = yes
read only = no

Step6. Verify the samba configurations


Step7. Allow in firewall

firewall-cmd –permanent –add-service=samba
firewall-cmd –reload

Step8. Start/enable services

systemctl start smb.service
systemctl enable smb.service
systemctl start nmb.service
systemctl enable nmb.service

Step9: Access the shared folder

Note: On Windows , On run prompt by pressing win + r key on your keyboard then type \centos and press enter key


Please enter your comment!
Please enter your name here