🖥️ Samba Server in Linux

✅ What is Samba Server?

Samba is an open-source software that allows Linux/Unix systems to share files and printers with Windows systems using the SMB/CIFS protocol.

👉 In simple words:
Samba = Linux ↔ Windows File Sharing


🔹 Features of Samba

  • 📂 File sharing between Linux and Windows
  • 🖨️ Printer sharing
  • 👤 User authentication
  • 🌐 Works with Windows Active Directory
  • 🔐 Secure password-based access

🔹 Samba Architecture

Main services:

  1. smbd โ€“ File & printer sharing service
  2. nmbd โ€“ NetBIOS name service
  3. winbindd โ€“ User authentication (for AD integration)

Main configuration file:

/etc/samba/smb.conf

🚀 Install Samba Server in Ubuntu

Step 1: Update system

sudo apt update

Step 2: Install Samba

sudo apt install samba -y

Step 3: Check installation

samba --version

📁 Create a Shared Folder

Step 1: Create directory

sudo mkdir /sharedfolder

Step 2: Set permissions

sudo chmod 777 /sharedfolder

⚙️ Configure Samba

Edit configuration file:

sudo nano /etc/samba/smb.conf

Add at the bottom:

[MyShare]
path = /sharedfolder
browseable = yes
writable = yes
guest ok = yes
read only = no

Save and exit.


🔄 Restart Samba Service

sudo systemctl restart smbd

Check status:

sudo systemctl status smbd

👤 Create Samba User (Secure Method)

sudo adduser username
sudo smbpasswd -a username

💻 Access Samba Share from Windows

  1. Press Windows + R
  2. Type:
\\Linux-IP-Address

Example:

\\192.168.1.10

By admin

Leave a Reply

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