Samba - File Share

Linux -5

·

2 min read

Samba is an open-source utility that enables file sharing between machines running on a single network. It enables Linux machines to share files with machines running different operating systems, such as Windows.

Access your desktop files from a laptop and share files with Windows and macOS users.

  1. Install Samba

  2. Create a new user

  3. Add the user to the samba DB

  4. Create a folder and change the ownership permission

  5. Add the folder to the samba config file

  6. Restart the samba service

apt install samba

Verify the Installation

whereis samba

The output prints the directory containing Samba. Another method of verifying the installation is by checking the Samba version

Lastly, confirm that Samba is running

To add a new user to Samba and the system

dduser sambauser

We need to Create Samba Password

To make a directory in sambauser and change the ownership

Configure the samba share

Access the configuration file once again to add the previously made sharing directory.

path: /home/sambauser/shared_folder

readonly = no

inherit permission =yes

browsable = yes

guest ok = no

create mask = 0775

directory mask = 0775

wins support = yes

valid users = @group_name

testparm is a very simple test program to check an smbd configuration file for internal correctness

Update the Firewall rules ufw allow samba

Restart the service

Finally, take the shared folder in cross-platform

Windows - \\ip-address\folder_name

Linux - smb://ip-address/folder_name


How to join AD (Domain Join in Linux)

Active Directory (AD) is a database and set of services that connect users with the network resources they need to get their work done.

Github https://github.com/Ibrahimsi/AD-Join

  1. chmod +x filename

  2. ./filename press enter Readout the line and enter your domain details etc... Finally join the domain. Restart your PC then checkout.

Thanks for reading...!!!!