Samba-Share Setup

Samba is basically used for sharing files, printers etc. with 
other computers which can be windows, Linux, Ubuntu, Mac, etc.
We have mentioned steps to install and configure samba in a
Linux System.
Step1: Install required packages using yum.
# yum install samba*

# rpm -qa | grep -i samba	(check installed packages)
Step2: Now configure samba configuration file per your 
requirement. Like you can set workgroup, user etc. if required.
After that add your the path with some details mentioned below
need to be shared. I have added "/test-share" folder.

Below is sample configuration file.
# cat /etc/samba/smb.conf
## See smb.conf.example for a more detailed config file or
## read the smb.conf manpage.
## Run 'testparm' to verify the config is correct after
## you modified it.

[global]
        workgroup = SAMBA
        security = user

        passdb backend = tdbsam
        map to guest = Bad User		(Required for not prompmting password)
        printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw
[test-share]
        comment = testing share
        path = /test-share
        writable = yes
        guest ok = yes
Step3: Now start/restart samba service to take effect and make 
it enable for boot.
# systemctl start smb
# systemctl enable smb
Step4: Now access it from remote machine using "\\X.X.X.X\test-share"
You can face some issues while accessing samba share from Windows
Machine from where you are accessing samba share. Let's discuss
about that.
When you face any issues like can't acces shared folder, guest 
login not allowed etc. You can start troubleshooting it step by
step like, check network communication, permissions of shared
folder, service is running or not etc.

One issue mentioned above "Guest logon". Due to some policies in
windows, you might face issue, To overcome that you can enable
guest login using below steps.

1. Open Group Policy editor. (gpedit.msc).
2. Then follow as: Computer Configuration> Administrative
Templates> Network> Lanman Workstation > Enable insecure guest
logons (Click on this and select enable)
 

Leave a Reply

Your email address will not be published. Required fields are marked *