MSRIT
BootCamp-2025
Session-2
Storage-and-Security-Configuration
Linux
Intranet Based File Storage

Session 2: Managing Common Storage for Students & Security Configuration

Intranet-Based File Storage:

Overview:

  • How to set up shared folders on the local network (Intranet), accessible by all students with unique logins.
  • Linux: Configure Samba for file sharing on the intranet.

Why Use Intranet-Based File Storage?

  • Provides a secure and controlled environment for students to access and share files.
  • Eliminates dependency on external cloud storage, reducing security risks.
  • Enhances collaboration and ensures easy monitoring of access and file changes.

Basic Samba Configuration:

  1. Install Samba:
    sudo apt update
    sudo apt install samba
  2. Create a shared directory:
    sudo mkdir -p /srv/samba/shared
    sudo chmod 777 /srv/samba/shared
  3. Edit Samba configuration file:
    sudo nano /etc/samba/smb.conf
    Add the following lines at the end:
    [SharedFolder]
    path = /srv/samba/shared
    browseable = yes
    writable = yes
    guest ok = no
    valid users = @students
  4. Create a Samba user group:
    sudo groupadd students
  5. Add students to the group and set Samba password:
    sudo usermod -aG students student1
    sudo smbpasswd -a student1
    If you get an error like usermod: user 'student1' does not exist, create the user first:
    sudo useradd -m student1
    sudo passwd student1
    Then re-run the usermod and smbpasswd commands.
  6. Restart Samba service:
    sudo systemctl restart smbd

Testing Samba Configuration:

  1. Verify Samba Service:
    sudo systemctl status smbd
  2. Check Shared Folder Permissions:
    ls -ld /srv/samba/shared
  3. Test Access from Another System:
    • On Windows, open File Explorer and enter \\<server-ip>\SharedFolder in the address bar.
    • On Linux, use the smbclient command:
      smbclient -U student1 -L //<server-ip>/SharedFolder

By following these steps, administrators can ensure smooth and secure user and storage management for students.