How to Install and configure the Samba server on oracle linux
To Install Samba Server on Oracle Linux 8.5
Introduction
Samba is an important component to seamlessly integrate Linux/Unix servers and desktops into active directory environments. It can function both as a domain controller and as a regular domain member.
Installation Procedure:
Step 1: Check the OS version by using the below commands
[root@linuxhelp linuxhelp]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.5"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
Step 2: Install the Samba Server by using the below command
[root@linuxhelp linuxhelp]# yum -y install samba*
Last metadata expiration check: 18:47:55 ago on Wed 25 May 2022 07:05:57 AM IST.
Package samba-client-libs-4.14.5-2.el8.x86_64 is already installed.
Package samba-common-4.14.5-2.el8.noarch is already installed.
Package samba-common-libs-4.14.5-2.el8.x86_64 is already installed.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
samba x86_64 4.15.5-5.el8 ol8_baseos_latest 867 k
samba-client x86_64 4.15.5-5.el8 ol8_baseos_latest 716 k
samba-common-tools x86_64 4.15.5-5.el8 ol8_baseos_latest 522 k
samba-krb5-printing x86_64 4.15.5-5.el8 ol8_baseos_latest 101 k
samba-libs x86_64 4.15.5-5.el8 ol8_baseos_latest 175 k
samba-pidl noarch 4.15.5-5.el8 ol8_baseos_latest 199 k
samba-test x86_64 4.15.5-5.el8 ol8_baseos_latest 2.0 M
samba-test-libs x86_64 4.15.5-5.el8 ol8_baseos_latest 120 k
samba-vfs-iouring x86_64 4.15.5-5.el8 ol8_appstream 104 k
.
.
Complete!
Step3: Enable the samba service by using the below command
[root@linuxhelp linuxhelp]# systemctl enable smb
Created symlink /etc/systemd/system/multi-user.target.wants/smb.service → /usr/lib/systemd/system/smb.service.
Step4: Start the samba service by using the below command
[root@linuxhelp linuxhelp]# systemctl start smb
Step 5: Check the Status of samba service by using the below command
[root@linuxhelp linuxhelp]# systemctl status smb
● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset:>
Active: active (running) since Thu 2022-05-26 01:54:33 IST; 4s ago
Step 6: Disable the firewall by using the below command
[root@linuxhelp linuxhelp]# systemctl disable firewalld
Step 7: Disable SELinux by using the below command
[root@linuxhelp linuxhelp]# setenforce 0
Step 8: Create Configuration to Access Samba by using the below command
[root@linuxhelp linuxhelp]# vim /etc/samba/smb.conf
[samba]
path = /sambashare
comment = samba
browseable = yes
writable = yes
guest ok = yes
read only = no
Step 9: Create a Directory in root by using the below command
[root@linuxhelp linuxhelp]# mkdir /sambashare
Step 10: Grant permission to the directory by using the below command
[root@linuxhelp linuxhelp]# chmod 777 /sambashare/
Step 11: Create a file in samba share Directory by using the below command
[root@linuxhelp linuxhelp]# touch /sambashare/test
Step 12: Create a user by using the below command
[root@linuxhelp linuxhelp]# useradd sambauser
Step 13: Add the normal user to samba user by using the below command
[root@linuxhelp linuxhelp]# smbpasswd -a sambauser
New SMB password:
Retype new SMB password:
Added user sambauser.
Step 14: Restart the samba service by using the below command
[root@linuxhelp linuxhelp]# systemctl restart smb
Step 15: Go to windows machine click windows button + R to Run and Enter the IP address as shown in the below image
Step 16: Enter the Samba user name and password as shown in the below image
Step 17: The samba share works as shown in the image below
With this the Installation of samba server on oracle linux 8.5 has come to an end.