Session 2: Managing Common Storage for Students & Security Configuration
Windows: Setting up shared folders using Windows File Sharing
- Example: Right-click on a folder > Properties > Sharing > Share with specific people.
- Assign unique logins to students and grant them access to the shared folder.
Steps to Set Up Windows File Sharing:
- Create a shared folder:
- Right-click on the folder you want to share.
- Click Properties > Sharing tab.
- Click Share... and select users who should have access.
- Set Permissions:
- Click Advanced Sharing > Permissions.
- Add users or groups and assign appropriate permissions (Read/Write).
- Enable Network Discovery and File Sharing:
- Go to Control Panel > Network and Sharing Center.
- Click Change advanced sharing settings.
- Turn on Network Discovery and File and Printer Sharing.
- Access the Shared Folder:
- Students can access the shared folder by typing
\\your-computer-name\shared-folderin File Explorer.
- Students can access the shared folder by typing
- Assign Unique Logins:
- Go to Computer Management > Local Users and Groups.
- Create unique student accounts and set passwords.
- Ensure they have permissions to access the shared folder.
Linux: Setting up shared folders using Samba
- Install Samba:
sudo apt update sudo apt install samba - Create a shared directory:
sudo mkdir -p /srv/samba/shared sudo chmod 777 /srv/samba/shared - Edit Samba configuration file:
Add the following lines at the end:
sudo nano /etc/samba/smb.conf[SharedFolder] path = /srv/samba/shared browseable = yes writable = yes guest ok = no valid users = @students - Create a Samba user group:
sudo groupadd students - Add students to the group and set Samba password:
sudo usermod -aG students student1 sudo smbpasswd -a student1 - Restart Samba service:
sudo systemctl restart smbd - Accessing the shared folder from Windows:
- Open File Explorer.
- In the address bar, type
\\linux-server-ip\SharedFolder. - Enter the Samba username and password when prompted.
Hands-on:
- Set up a shared directory accessible to student users on both Linux (Samba) and Windows.
- Follow the steps above to configure shared folders in both operating systems.
- Test access from different user accounts to verify permissions.
- Modify permissions as needed to ensure proper security.