File Sharing between Windows and Linux - BRS MEDIA TECHNOLOGIES
file sharing Windows and Linux

File Sharing between Windows and Linux

Overview

Have you ever wanted to create a wide-open file share on your LAN to enable your users to quickly and easily share files? In this video, the viewer is shown the process of setting up a custom Samba implementation on Debian/Ubuntu that makes sharing files on your LAN easy.

Install Samba

 $ sudo apt update
 $ sudo apt install samba

Stop Samba daemon

Check if it’s running:

 $ sudo systemctl status smbd

If it is, stop the daemon:

 $ sudo systemctl stop smbd

Back up Samba config file

 $ sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak 

Create new Samba config file

 $ sudo nano /etc/samba/smb.conf

New file (change the items in bold accordingly):

 [global]
 server string = File Server
 workgroup = WORKGROUP
 security = user
 map to guest = Bad User
 name resolve order = bcast host
 include = /etc/samba/shares.conf

Create Samba shares config file

 $ sudo nano /etc/samba/shares.conf

New file (change the items in bold accordingly):

 [Public Files]
 path = /share/public_files
 force user = smbuser
 force group = smbgroup
 create mask = 0664
 force create mode = 0664
 directory mask = 0775
 force directory mode = 0775
 public = yes
 writable = yes
 
 [Protected Files]
 path = /share/private_files
 force user = smbuser
 force group = smbgroup
 create mask = 0664
 force create mode = 0664
 directory mask = 0775
 force directory mode = 0775
 public = yes
 writable = no

Create samba user and group

Create group:
 $ sudo groupadd --system smbgroup
Create user:
 $ sudo useradd --system --no-create-home --group smbgroup -s /bin/false smbuser

Create shared directories

Create directories:
 $ sudo mkdir -p /share/public_files
 $ sudo mkdir /share/private_files
Change ownership/permissions:
 $ sudo chown -R smbuser:smbgroup /share
 $ sudo chmod -R g+w /share

Related Article

How to Disable Snap on Ubuntu 22.04

How to Disable Snap on Ubuntu 22.04

Contents0.1 Introduction0.2 Requirements0.3 Step 1: Disable Snap0.4 Step 2: Remove Snap packages0.5 Step 3: Remove Snap1 Next Steps1.1 Key Terms: […]

Check-CPU-temp

How to resolve CPU Overheating

IF YOU ARE FACING OVERHEATING PROBLEM OF UBUNTU RUN BELOW COMMANDS TO YOUR TERMINAL Step 1:- sudo add-apt-repository ppa:linrunner/tlpStep 2:- […]

Kubctl Kubernetes Commands

Some facts of Kubernetes kubeadm and kubectl

Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications. The open source […]