How to Install & Configure SAMBA on Linux

How to Install SAMBA on LINUX
Getting your Trinity Audio player ready...

How to Install & Configure SAMBA on Linux

I am going to discuss how to install & configure samba on linux in this article. We will see how to install & configure samba on linux with different versions of RHEL and how to configure samba on linux to function properly.

I guess if you are here so you must be having what is samba and why it is used. I will have brief details about samba just considering those who have no idea about it.

What is SAMBA in Linux?

Samba is a free utility software or you can say service by Operating System and shipped with almost all distributions of Linux so as RHEL as well.

Samba’s name is taken from SMB Protocol which stands for Server Message Block. It is released under GNU License.

Samba is mostly running on UNIX based operating systems like RHEL, Solaris, AIX, and many other BSD compatible operating systems and even on macOS.

Samba was developed by Andrew Tridgell and used for file and print services for various Microsoft Windows clients.

In a simple way, it can provide access to UNIX or Linux file systems to windows users to their desktops and servers.

The latest version of Samba 4 provides Active Directory and Windows NT Domain Level Support.

So let us come back to our main topic how to install samba on linux.

How to Install & Configure SAMBA on RHEL 5

Let us see how to install & configure samba on RHEL5. You can simply install all samba3 packages and adbindproxy package. Enable service to start with system start and add share details in smb.conf and restart samba service you should be good.

# yum --enablerepo=* clean all
# yum --enablerepo=* install samba3*
# rpm -ivh centrifydc-adbindproxy-5.3.0-rhel4-x86_64.rpm
# /usr/share/centrifydc/bin/adbindproxy.pl 
                     accept all default values
# chkconfig --add centrifydc-samba
# chkconfig --level 345 centrifydc-samba on
# service centrifydc-samba restart
Update smb.conf and restart the service

How to Install & Configure SAMBA on RHEL 6

Moreover, the procedure of installation is the same with some tweaking required. Let us see via example.

#  yum --enablerepo=* clean all
# yum --enablerepo=* list samba4*
Installed Packages
samba4.x86_64 4.2.10-15.el6 @distro
samba4-client.x86_64 4.2.10-15.el6 @distro
samba4-common.x86_64 4.2.10-15.el6 @distro
samba4-dc.x86_64 4.2.10-15.el6 @distro
samba4-dc-libs.x86_64 4.2.10-15.el6 @distro
samba4-devel.x86_64 4.2.10-15.el6 @distro
samba4-libs.x86_64 4.2.10-15.el6 @distro
samba4-pidl.x86_64 4.2.10-15.el6 @distro
samba4-python.x86_64 4.2.10-15.el6 @distro
samba4-test.x86_64 4.2.10-15.el6 @distro
samba4-winbind.x86_64 4.2.10-15.el6 @distro
samba4-winbind-clients.x86_64 4.2.10-15.el6 @distro
samba4-winbind-krb5-locator.x86_64 4.2.10-15.el6 @distro
Available Packages
samba4-devel.i686 4.0.0-23.alpha11.el6 optional
samba4-libs.i686 4.0.0-23.alpha11.el6 optional
samba4-swat.x86_64 4.0.0-68.el6_7.rc4 security 
This example is from server where it is already installed else it will 
show all in available tab instead of Installed Tab.
# yum --enablerepo=* install samba4*
# rpm -ivh centrifydc-adbindproxy-5.3.0-rhel4-x86_64.rpm
# /usr/share/centrifydc/bin/adbindproxy.pl 
             ( accept all default values )
In case of any issues, please re-run the above perl script and when prompte
d for winbindd listen path , please provide below.
Please specify the stock samba winbindd listen path(dir) if it is not in 
[/run/samba/winbindd] : /var/run/samba/winbindd
Using (/var/run/samba/winbindd)
Existing file '/etc/centrifydc/centrifydc.conf' 
is backed up as '/etc/centrifydc/centrifydc.conf
pre_adbindproxy'
# chkconfig --add centrifydc-samba
# chkconfig --level 345 centrifydc-samba on
# service centrifydc-samba restart
Update smb.conf and restart the service

How to Install & Configure SAMBA on RHEL 7

Please refer to the below procedure for how to install samba on RHEL 7. Let us see via example.

# yum --enablerepo=* clean all
# yum --enablerepo=* install samba4*
# rpm -ivh centrifydc-adbindproxy-5.3.0-rhel4-x86_64.rpm
Update /etc/centrifydc/scripts/functions.cdc and comment out 
LD_LIBRARY_PATH 
Open /etc/centrifydc/scripts/functions.cdc for editing and comment 
out the lines containing LD_LIBRARY_PATH. 
For example:
#LD_LIBRARY_PATH=/usr/share/centrifydc/lib64:/user/share/
centrifydc/kerberos/lib64:$LD_LIBRARY_PATH
# export LD_LIBRARY_PATH
Save /etc/centrifydc/scripts/functions.cdc. Change the symbolic link 
location of /sbin/adkeytab to /usr/share/centrifydc/libexec/adkeytab:
# cd /sbin
# ls -l adkeytab
# rm adkeytab
Re-Create soft link /sbin/adkeytab to /usr/share/centrifydc/libexec/
adkeytab
# ln -s /usr/share/centrifydc/libexec/adkeytab /sbin/adkeytab
# /usr/share/centrifydc/bin/adbindproxy.pl 
                 (accept all default values)
In case of any issues, re-run the above perl script and when prompted 
for winbindd listen path , please provide below
Please specify the stock samba winbindd listen path(dir) if it is not in 
[/run/samba/winbindd] : /var/run/samba/winbindd
Using (/var/run/samba/winbindd)
Existing file '/etc/centrifydc/centrifydc.conf' 
is backed up as '/etc/centrifydc/centrifydc.conf.pre_adbindproxy'
# systemctl enable centrifydc-samba

 Conclusion

That`s all about how to install & configure samba on linux. We have seen all three major versions of Red Hat Enterprise Linux.

RHEL5 is already out of support and RHEL6 is expected. But the overall process is almost similar but with few small tricks.

Thank you for going through this article. Please share your opinion about this process if you have any queries.

Request you to subscribe to our blog and share as much as you can on your social media and help us by extending the article’s reach to the required audience.

Leave a Reply