In this tutorial you will see how to install Samba file sharing between your CentOS 7 and Windows system. In this post I have showed about secure file sharing, here we have created admin user to access secure file sharing which will be access only from admin credential. Lets see how to install and configure Samba on CentOS 7.
Steps to install Samba
1. Very first step is to install Samba using this command
# yum install samba samba-client samba-common
2. Enable Samba Service by adding into Firewall with the following command
# firewall-cmd --permanent --zone=public --add-service=samba
# firewall-cmd --reload
3. Create Samba group and Add user in this group with samba password as follow
# groupadd smbgrp
# usermod admin -aG smbgrp
# smbpasswd -a admin
4. Now, create directory which will be use for sharing files and set the directory permission and SELinux security for samba
# mkdir -p /srv/samba
# chmod -R 0770 /srv/samba
# chown -R root:smbgrp /srv/samba
# chcon -t samba_share_t /srv/samba
5. Next step to edit the config file with samba settings. Make copy of smb.conf file before making any changes
# cp /etc/samba/smb.conf /etc/samba/smb.conf.old1
# vi /etc/samba/smb.conf
Add the following in config file ( Replace Directory and User name with Yours )
[samba]
comment = samba share
path = /srv/samba
valid users = @smbgrp
guest ok = no
writable = yes
browsable = yes
6. Run the following command to check samba configuration
# testparm
7. Restart samba services and enable on boot
# systemctl restart smb.service
# systemctl restart nmb.service
# systemctl enable smb.service
8. Final step is to test Samba with Windows Machine
My Samba Server : \\192.168.10.202\
Once you enter right credentials you will see the following file sharing windows where you can place the data
Video Tutorial
In this post, I have showed you how to enable secure file sharing between CentOS 7 and Windows by installing and configuring Samba4. Share any thoughts with us via comment section below
Way cool! Some extremely valid points! I appreciate you penning this post and the rest of the website is very good. Morganne Hermie Baudelaire
Thank You Buddy.. Many More to Come..Keep Visiting and share it to needed one..subscribe my channel..:)
It is in reality a great and helpful piece of info.
I am satisfied that you simply shared this useful info with us.
Please keep us up to date like this. Thank you for sharing.
I’m really loving the theme/design of your weblog. Do you ever run into any web browser compatibility problems?
A number of my blog audience have complained about my site not operating correctly in Explorer but looks great in Safari.
Do you have any suggestions to help fix this problem?
Ask them to update the explorer to latest version
If you wish for to obtain much from this post then you have to apply these techniques to your
won blog.