Professional Documents
Culture Documents
CentOS7)
August 14, 2016
This Tutorial describes you the Step by Step procedure to install and configure the SAMBA
server and client on Linux (RHEL7/CentOS7).
Topics involved:
What is Samba?
Uses of Samba?
Samba requirements
What is Samba?
Samba provides a stable and highly compatible file and print sharing service that allows a
Linux node to act as a client, a member server, or even a Primary Domain Controller (PDC) or a
member of an Active Directory (AD) service on Microsoft-based networks. Samba interacts
with Microsoft's CIFS built on the Server Message Block (SMB) protocol.
Uses of Samba?
1. As a File Server like NFS to share the files but across OS (linux to windows).
Samba details
Package : samba*
Port no : 137,138,139
Script : /etc/init.d/smb
Daemon : smbd
Use the following instructions to install and configure the SAMBA Server and Client on Linux
(Centos7/RHEL7).
Lab Setup:
Network enabled
Prerequisites:
2. Make an entry of each host in /etc/hosts for name resolution or Configure it in DNS to resolve
the IP, if you use server name instead of IP address. Read also how to configure DNS Server on
RHEL7 But we use IP Address for in this article.
Login into the server Linux1 (192.168.2.61) and do the following steps to install and configure
Samba Server.
Install the appropriate Samba packages "samba*" using yum to avoid dependencies issue. if
yum is not configured, please refer the link Yum Configuration on Linux.
Samba server main configuration file name is smb.conf which is located in /etc/samba/. It has
many directives which can be used for each purpose.
Assume that, we are going to configure the samba server to share the /mnt directory. Lets edit
the main configuration file.
Just go to the last line and append the below entries into the file.
[mnt]
path = /mnt
Note : By default samba doesn't allow to write any data. If you want the share to be write-able
mode, add the below directive as "yes" and change the file permission (chmod 777 /mnt) to
write-able. If file permission is not set to write, samba will allow to write the data, but linux file
permission wont allow to write, so you will face an issue as permission denied.
writeable = yes
[mnt]
path = /mnt
writeable = yes
Always after changing the configuration file, use the command "testparm" to check the
changes for any syntax errors.
# Global parameters
[global]
workgroup = MYGROUP
security = USER
[homes]
read only = No
browseable = No
[mnt]
path = /mnt
read only = No
If you dont have any syntax errors, you will get the output as "Loaded services file OK." If you get
error as unknown parameter, please use the correct word.
Samba need a additional password to provide the access as well as that user should be a
valid linux user, which means user should be exist in the server. if not, create a new user using
useradd command and add the user to the samba as below. It will prompt to enter the
additional new password specially for samba.
Always first check the access locally and finally check from client end. It will be easy to
troubleshoot where the problem exists when the problem occurs to access the samba shares
locally or over the network.
Use the below samba client utility (smbclient) in which specify the samba server address (-L
192.168.2.61) and user (-U user1). It will prompt to enter the password of the user added to the
samba.
Server Comment
--------- -------
Workgroup Master
--------- -------
WORKGROUP LEARNITGUIDE
If we get the output as above, then we can access the samba server successfully.
Execute the same command from the client to ensure the same is working from network also.
We should get the same output as we got locally.
That's all the installation and configuration of Samba server on Linux (RHEL7 / CentOS7).
Thanks for reading our post. share with your friends. We appreciate your feedback, Leave your
comments if any.
We have more articles to be updated soon. To not miss any updates, Follow us on social
networking sites @Learnitguide and Subscribe us on our Youtube channel
@Learnitguidenetblog. configure samba Server on RHEL7/Centos7, linux samba server setup, Linux samba configuration, samba server
configuration, Step by step samba Configuration, install samba server in centos7, samba server configuration, samba client configuration, samba
installation and configuration, samba server configuration in linux, samba configuration in linux, linux samba server configuration, samba configuration
linux, samba server installation and configuration in linux, samba configuration in linux step by step, samba client configuration in linux, linux samba
configuration, samba configuration example, redhat samba configuration, samba server configuration in ubuntu step by step, samba server linux, samba
in linux, linux samba, samba configuration in linux, samba server configuration in linux, samba linux server, how to configure samba server in linux, what is
samba in linux, samba on linux, linux samba server, samba tutorial linux, linux samba configuration, samba server for linux, linux samba tutorial, samba
linux, linux samba tutorial for beginners, samba server configuration on rhel7, samba server configuration on centos7
Tags
Linux 89
Linux Server Configuration 23
Linux Tutorials 29
Trending 71
Next Previous
Install Openstack Cloud Mitaka on RHEL7 / How to create a LVM Physical Volume in
CentOS7 using RDO Linux
(https://www.learnitguide.net/2016/08/insta (https://www.learnitguide.net/2016/08/crea
ll-openstack-mitaka-cloud-on-rhel7.html) te-lvm-physical-volume-in-linux.html)
ALSO ON LEARNITGUIDE
Couldn't find device with Docker CMD & Ansible Roles Explained Configur
uuid - Recover LVM … ENTRYPOINT with Examples - … Passwor
4 years ago • 2 comments 3 years ago • 4 comments 4 years ago • 8 comments 3 years ago
Couldn't find device with dockerfile, dockerfile cmd, ansible, ansible roles, ssh, passw
uuid, Recover LVM dockerfile entrypoint, cmd ansible roles explained, keygen, co
Metadata, recover linux lvm vs entrypoint, dockerfile create ansible roles, how to password
Sponsored
Premium 3 BHKs from ₹ 2.29 Cr at The Reserve Collection, Sunteck City, Goregaon
Sunteck Realty Limited
Indians born before 1966 are now eligible for a free hearing aid trial!
Hearing Expert
Hire the right candidates with the fast and easy hiring solution
apna Try Now
This German hearing aid company is looking for 1000 people to try this device
Hear.com
Name