Basically, hide a hard drive from other users - how?
Author Message
Posted : Sun, 29 June 2008 23:53:52
Subject : Basically, hide a hard drive from other users - how?
I switched to linux about 6 months ago and have been loving its versatility compared to windows. Anything i have thought i would like to do, i have found a way to do it. Recently my girlfriend has been asking to use my computer more and more regularly so i decided to make her a user account. Its all set up fine, shes got a home folder and she can use office apps, surf and check her emails and stuff.... but call me crazy but im not too happy about her sniffing around my files and deleting them by accident. Ive restricted some access, she cant see my home, she cant see my emails, in fact, anything thats linked to my account is unaccessable.... just the way i want it. Only 1 problem remains - The icons on the desktop for my external drives are there, now i can play with the permissions to stop her having access, but, i know if she can see them but can't access them, she will automatically think im up to no good. women huh? (apologies to any females on here) So basically, how do i stop the icons for the HDDs showing up on her desktop and in the "Computer screen etc" but show up on mine? I thought about using mount and umount commands in the session startup but i think that might get a bit messy? Any ideas?
Penguin
Posted : Mon, 30 June 2008 10:34:51
Subject : Re: Re: Basically, hide a hard drive from other users - how?
One way to do it is to set your fstab (/etc/fstab - the file which tells your distro which drives to mount and where) so it doesn't auto mount the drive(s), and change the KDE settings to not show unmounted drives. You could also (if you really wanted) only allow root to mount/unmount the drive. A quick example of what the fstab line might look like after is this: Just don't mount it: "/dev/sdb1 /media/Stuff auto rw,noauto,async,exec 1 1" Don't mount it and only let root mount it: "/dev/sdb1 media/Stuff auto rw,noauto,async,exec,nouser 1 1" I hope this helps, let me know how it turns out / if this does(n't) sort your problem. Penguin Edit: Hmm, it seems it doesn't like tab spaces; don't copy the entire line, just the "rw,noauto,async,exec" part, and replace what's there already (alternatively, just change what's there so you have noauto (and nouser if you only want root to mount it) in there. [Modified by: Penguin on June 30, 2008 10:37 AM] Edit 2: If you wanted, you could also change the mount point to your home directory, so looking in /media (or /mnt) wont show the mount points either (thus not giving away the fact that some thing's not mounted). So instead of "/media/Stuff" you'd have /home/mount/Stuff" (or wherever, just make sure the directory exists where you're trying to mount to, it's not always necessary, but it never hurts). [Modified by: Penguin on June 30, 2008 10:45 AM]
beavis2k8
Posted : Mon, 30 June 2008 17:26:16
Subject : Re: Basically, hide a hard drive from other users - how?
[quote]Edit 2: If you wanted, you could also change the mount point to your home directory, so looking in /media (or /mnt) wont show the mount points either (thus not giving away the fact that some thing's not mounted). So instead of "/media/Stuff" you'd have /home/mount/Stuff" (or wherever, just make sure the directory exists where you're trying to mount to, it's not always necessary, but it never hurts).[/quote] That works how I wanted, never even thought of that! Thanks very much! Now I can get on with customising her applications menu :D