No Internet
-
- Black ninja
- Posts: 35
- Joined: 29 Feb 2024, 21:52
- Distribution: Porteus 5.01
No Internet
Post#16 by Argo Navis » 14 Mar 2024, 00:17
Argo Navis
-
- Black ninja
- Posts: 35
- Joined: 29 Feb 2024, 21:52
- Distribution: Porteus 5.01
No Internet
Post#17 by Argo Navis » 14 Mar 2024, 00:22
Should I ask this question somewhere else on the forum? There is no thread with the keywords 'rbash' or 'chroot jail' so I don't know where to start with this.
Argo Navis
beny
- Ed_P
- Contributor
- Posts: 8961
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
No Internet
Post#19 by Ed_P » 14 Mar 2024, 03:10
Argo don't over complicate your idea. Two other options, 1. create a backup of each students' USB drives, or 2. keep a log of how you create each students' USB drive noting any drivers you had to add. If a student screws up their drive, recreate it.
Ed_P
-
- Black ninja
- Posts: 35
- Joined: 29 Feb 2024, 21:52
- Distribution: Porteus 5.01
No Internet
Post#20 by Argo Navis » 14 Mar 2024, 14:20
Argo Navis
- Ed_P
- Contributor
- Posts: 8961
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
No Internet
Post#21 by Ed_P » 14 Mar 2024, 16:31
Ok. How about not letting them take the USB sticks home and configure the USB sticks to not access the harddrive?
Have you considered the Porteus Kiosk system?
Ed_P
-
- Black ninja
- Posts: 35
- Joined: 29 Feb 2024, 21:52
- Distribution: Porteus 5.01
No Internet
Post#22 by Argo Navis » 14 Mar 2024, 19:09
As for not letting them taking the pendrive at home, that's for sure. But I'm more worried about a student starting a session in Windows, copying a file on the pendrive, rebooting and having access to it from the Porteus session.
What I'm trying to achieve with a restricted shell is to limit their capacity to have access to the mounted usb drive. Correct me if I'm wrong, by all means, but as far as my understanding of Porteus goes, I understand that the /Home/ folder is encoded in the savefile in a .dat format, so a file cannot be "introduced" from outside (a Windows session for example) inside the /Home folder. So if the guest user was jailed inside its /Home folder and didn't have access recursively to the pendrive running Porteus, they would not have access to a file stored on the pendrive outside of the /Home folder.
Anyway, excuse me if this does not make any sense or if I use incorrectly the concepts and the vocabulary, I'm a French literature teacher first, and I try to learn this as I go, but it is still very abstract to me.
Argo Navis
- Ed_P
- Contributor
- Posts: 8961
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
No Internet
Post#23 by Ed_P » 14 Mar 2024, 20:48
Argo Navis wrote: ↑14 Mar 2024, 19:09I'm a French literature teacher first, and I try to learn this as I go, but it is still very abstract to me.


From my experience CDs went out of use 20 yrs ago. But CD drives can be USB connected for people who want or need to use them. The Kiosk runs from USB drives TTBOMK. It also runs from a server so a single machine in your class as a server might work for your plan.Argo Navis wrote: ↑14 Mar 2024, 19:09I read that the Porteus Kiosk cannot be installed on a usb stick, only on CD? If that is not accurate anymore, it could effectively be more appropriate.
The save.dat file only comes into play on drives formatted as FAT or NTFS. If the drive is an ext format the files and all changes are stored directly to the drive. A user has the option to save changes as .xzm files. I'm not on Porteus at the moment so I can't check if there are other save changes options. I'll get back to you later.Argo Navis wrote: ↑14 Mar 2024, 19:09my understanding of Porteus goes, I understand that the /Home/ folder is encoded in the savefile in a .dat format, so a file cannot be "introduced" from outside (a Windows session for example) inside the /Home folder.
Ed_P
No Internet
Post#24 by beny » 14 Mar 2024, 21:59
beny
-
- Black ninja
- Posts: 35
- Joined: 29 Feb 2024, 21:52
- Distribution: Porteus 5.01
No Internet
Post#25 by Argo Navis » 15 Mar 2024, 02:48
I did just that and then tried installing the .iso from Porteus to the new pendrive. When I ran Porteus-installer-for-Linux.com it gave me the error "Installation failed with error code '1'" and gave me a 'debug.txt' file.
Here is the content of debug.txt:
Code: Select all
partition: /dev/sdb
partition mount point: /mnt/sdb
installation path: /mnt/sdb/boot
filesystem: ext4
bootloader: lilo
error code: 1
system: porteus.example.net 6.6.20-porteus x86_64
mount details: /dev/sdb /mnt/sdb ext4 rw,noatime,nodiratime 0 0
full partition scheme:
Disk /dev/loop0: 103.7 MiB, 108732416 bytes, 212368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 4 GiB, 4294966784 bytes, 8388607 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 122.98 MiB, 128954368 bytes, 251864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 112.1 MiB, 117542912 bytes, 229576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 20.65 MiB, 21655552 bytes, 42296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop5: 24.19 MiB, 25362432 bytes, 49536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop6: 73.66 MiB, 77242368 bytes, 150864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop7: 61.33 MiB, 64311296 bytes, 125608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop8: 196 KiB, 200704 bytes, 392 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop9: 229.37 MiB, 240513024 bytes, 469752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop10: 1.74 MiB, 1826816 bytes, 3568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop11: 204 KiB, 208896 bytes, 408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SAMSUNG MZVL2512HCJQ-00B00
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 51A09159-DE78-45E2-8D50-3B33637932BC
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 534527 532480 260M EFI System
/dev/nvme0n1p2 534528 567295 32768 16M Microsoft reserved
/dev/nvme0n1p3 567296 962465791 961898496 458.7G Microsoft basic data
/dev/nvme0n1p4 962465792 964562943 2097152 1G Windows recovery environment
/dev/nvme0n1p5 964562944 998117375 33554432 16G Windows recovery environment
/dev/nvme0n1p6 998117376 1000215182 2097807 1G unknown
Disk /dev/sda: 14.41 GiB, 15472047104 bytes, 30218842 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x63ccda64
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 30218239 30216192 14.4G c W95 FAT32 (LBA)
Disk /dev/sdb: 28.91 GiB, 31042043904 bytes, 60628992 sectors
Disk model: USB3.0 32 IRON
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Argo Navis
-
- Black ninja
- Posts: 35
- Joined: 29 Feb 2024, 21:52
- Distribution: Porteus 5.01
No Internet
Post#26 by Argo Navis » 15 Mar 2024, 03:00
I did format the usb with no partition
Reason: Removed URL tags from a forum posting.
Argo Navis
- Ed_P
- Contributor
- Posts: 8961
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
No Internet
Post#27 by Ed_P » 15 Mar 2024, 04:47
Ed_P
No Internet
Post#28 by beny » 15 Mar 2024, 07:43
Disk /dev/sdi: 119.08 GiB, 127865454592 bytes, 249737216 sectors
Disk model: Transcend
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x105145d2
Device Boot Start End Sectors Size Id Type
/dev/sdi1 * 2048 249737215 249735168 119.1G 83 Linux
beny
-
- Black ninja
- Posts: 35
- Joined: 29 Feb 2024, 21:52
- Distribution: Porteus 5.01
No Internet
Post#29 by Argo Navis » 18 Mar 2024, 16:06
I formated a pendrive with a small FAT32 partition holding the EFI and boot directories and a big ext4 for the Porteus files, its works super well.
My question is, once the booting process is over, does Porteus still need to have access to EFI/boot?
My problem is this: once the booting is done, the guest user still has access to a FAT32 filesystem where he can have stashed a document from a previous Windows session. So I would like to cut access to that partition for the guest user.
As far as I uderstand, I can remove the permission to mount exterior pendrive (although I'm not too sure how, for what I have tried so far doesn't work). Is there a way to write a script that would retroactively unmount the FAT32 partition where the boot is, and at what point of the booting process should I insert that script so as not to interrupt anything else? (In other words, how do I make my guest take off it's boot after he came inside...

Argo Navis
No Internet
Post#30 by beny » 18 Mar 2024, 18:17
beny