LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hide or protect a hard drive (https://www.linuxquestions.org/questions/linux-newbie-8/hide-or-protect-a-hard-drive-4175499109/)

sundry_50 03-22-2014 11:51 AM

Hide or protect a hard drive
 
I'm teaching senior citizens to use Ubuntu 12.04 in a classroom. My knowledge is self discovered via books, magazines and internet. The commmand line, fstab and simple scripts are not scary for me. Here is my classroom situation:
1) We have machines with Microsoft W7/8 dual booting from drive1.

2) Ubuntu boots from drive2 but was installed without the W7/8 drive plugged in so, grub knows nothing about the other drive.

3) OS boot selection is via F12 (boot device) hard drive selection.

4) Our IT guys are strictly Microsoft centric and refuse to dual boot with linux involved. They are also paranoid about linux access to their drive. I know...live DVD boot...shhhh!

5) Teaching Ubuntu requires users to be able to use sudo. This means they can see the Microsoft drives in Nautilus.

What I think I want:
1) No auto mount if selected in Nautilus.
2) sudo mount read only.

-I'm willing to gamble that any user smart enough to mount the drive from the command line with rw permission will also be very careful.
-I think fstab mount as ro might be good enough but is there another way?
-Could I hide the Microsoft drive from view? Maybe KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"

Thanks to linuxquestions for getting me this far!

jefro 03-22-2014 02:35 PM

I don't have any complaints about #1-4 but we get to #5. IT has a right to manage.

If this is a training environment then let them go wild. Might just take out ntfs-3g or fat support. They could only then read.

sundry_50 03-22-2014 04:48 PM

Absolutely, W7/8 IT has the right to decide. Removing ntfs/fat would eliminate USB too, wouldn't it?

I'm open to other suggestions...

syg00 03-22-2014 06:07 PM

Ubuntu sudo allows all commands to everybody ... :scratch:

You could change that - might be simpler. There a are a bunch of tutes on configuring sudo on the web - here is one I found quickly.
Be aware, you can really screw your system(s) if you stuff this up. Make sure you keep your own userid safe from any changes.

jefro 03-22-2014 06:57 PM

The old ntfs module was read only.

Guess you could have them run a VM or such instead. Or run from a web browser like SuseStudio or java virtual machine.
Could pxe/gpxe boot to some environment.

Could remote into a system.

sundry_50 03-28-2014 08:59 AM

Following a hint in another site I found an answer that works for us.

sudo blkid will list the UUID of the partitions
cp /etc/fstab to origs is where I backed up the existing fstab file
sudo nano /etc/fstab to edit fstab, added a line as below with UUID for the windows drive
UUID=xxxxxxxxxxxxx /dev/junk ntfs noauto,nouser,noexec,nodev,ro 0 0

This process made the Microsoft partitions invisible to Nautilus. Students can't see them so they won't try to mount them. /dev/junk is bogus and ntfs isn't going to work either. It turned out to be simple. Thanks to all for ideas.


All times are GMT -5. The time now is 04:46 PM.