LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-22-2014, 11:51 AM   #1
sundry_50
LQ Newbie
 
Registered: Jan 2005
Distribution: knoppix/debian
Posts: 21
Blog Entries: 2

Rep: Reputation: 0
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!
 
Old 03-22-2014, 02:35 PM   #2
jefro
Guru
 
Registered: Mar 2008
Posts: 11,421

Rep: Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398
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.
 
Old 03-22-2014, 04:48 PM   #3
sundry_50
LQ Newbie
 
Registered: Jan 2005
Distribution: knoppix/debian
Posts: 21
Blog Entries: 2

Original Poster
Rep: Reputation: 0
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...
 
Old 03-22-2014, 06:07 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,240

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
Ubuntu sudo allows all commands to everybody ...

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.
 
Old 03-22-2014, 06:57 PM   #5
jefro
Guru
 
Registered: Mar 2008
Posts: 11,421

Rep: Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398Reputation: 1398
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.

Last edited by jefro; 03-22-2014 at 06:59 PM.
 
Old 03-28-2014, 08:59 AM   #6
sundry_50
LQ Newbie
 
Registered: Jan 2005
Distribution: knoppix/debian
Posts: 21
Blog Entries: 2

Original Poster
Rep: Reputation: 0
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.
 
  


Reply

Tags
fstab, mount, permission


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
format hard drive and add to existing hard drive to extend the capacity in linux boby.kumar Linux - Newbie 1 04-10-2013 07:18 AM
Where can trojans/viruses hide on a hard drive? papercut36 General 9 02-13-2013 09:28 PM
Moving files from a Linux hard drive to a Windows Vista Premium hard drive WolfMan51 Linux - Hardware 5 07-12-2011 09:19 AM
Booting Linux on an external USB hard drive (not a memory stick, a hard drive) comcastuser Linux - Hardware 4 01-13-2010 06:59 PM
how to protect hard disk from bittorrent? bbmak Linux - Software 4 08-17-2004 04:27 PM


All times are GMT -5. The time now is 09:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration