3

Info: I am running windows 7 home Premium

I have a usb drive that I use a lot to share files between people I with whom I have a professional relationship with, like when sharing a in-work paper with a professor, per example.

I also have friends/roommates who are prone to computer-pranks, like the common "facejacking", and, among other things, change the display name of usb drives (and other connectable devices) to stupid things, like "THIS IS VIRUS", or other stuff that would probably get censored if I typed them.

Usually, I have no problem about this kind of thing, but since this particular USB drive is for work-related purposes, and I'm not sure they understand the concept of boundaries, I'm trying to lock or password-protect my usb drive's name (to "my drive", or something), so I can avoid... unpleasant events.

I have been looking around the drive's properties window, but no luck in finding this option. So, I ask: is this possible? if yes, how?

Thank you in advance.

(I do of course check the name before handing out the drive to anyone, but I don't know, someday I might forget, so... better saffe than sorry, I guess)

3
  • Simplest solution: just talk to them. Tell them to grow up and respect your belongings. Backup solution: prank them in a similar manner (possibly getting them in trouble at work) to show them what it’s like since they obviously can’t put themselves in other people’s shoes.
    – Synetech
    Nov 21, 2013 at 21:35
  • Yes, that would be the social aspect of the solution, what I was looking for here was the more technical-oriented one. Still, you are right, and I did that (the first part - I only "threatened" to do the second). However, they are quite a few, and even if most do understand and respect what I say, all it takes is one not doing so. And, like I said, better safe than sorry. Still, of course, thank you for your interest and response.
    – Sampaio
    Nov 25, 2013 at 23:33
  • Well I for one am starring the question because I’d be interested to see if such a thing is possible (at least in any feasible manner).
    – Synetech
    Nov 26, 2013 at 1:23

2 Answers 2

1

USB drives are exposed to the operating system on the block level using a standard interface that does not support hardware-level or access control for specific functions like volume name, etc.

What this means is that anyone on any system, with administrator privileges on that system, can modify anything on the device, including volume name or anything else. You can lock the MBR or whatever but it's still possible to unlock it.

Things like Bitlocker will prevent reading the data, but can't prevent overwriting or destroying the data by reformatting the drive or attaching the device to a computer running another operating system such as Linux.

Some workarounds:

  • SD cards have a write protect tab - if it's removed, it becomes read only unless the tab is replaced or your operating system is hacked/modified to not respect the hardware write protect tab. You can use SD cards and remove the write protect tab when ready to distribute.
  • You can distribute your data on a write-once read-many medium like a CD or DVD.
  • You can distribute the data using a network share or online service where you can retain access control over the original copy.
-1

The only possible way I know is by locking the MBR.

DiskPart
List Disk [Find the number of your USB drive by its capacity]
Select Disk [USB drive number]
Attributes Disk Set ReadOnly

That should do it.

Alas, it would also lock your drive for writing. I'm not sure exactly how far, but I think you can still write to files, since its only the MBR that's locked, not the MFT.

EDIT (Nov 11 at 22:20): I've made some tests (and some recalling), and the results are somewhere between strange to inconsistent. I created a VHD with 2 partitions. When I locked the drive it blocked writing to the volumes as well (I was able to write to the volumes, but it if I unplugged and replugged the disk everything would be like before my writing).

Then I remembered the oddity I came across last time I've played with it. If I set partition 1 to readonly, it would make partition 2 readonly partially. Then I found an article somewhere in technet that said setting as readonly only one partition out of two on one drive is possible only on dynamic drives.

I'll do some more testing later, maybe I'll find different behaviors when locking drives on dynamic disks.

SECOND EDIT: Sorry for taking so long, I was swamped with work. I've tested this quite thoroughly, and documented the steps and results. It's a bit long, so you may jump to the conclusion at the end regarding the question's subject, but I had to document the inconsistencies.

Configuration - OS Win2008r2, One VHD with two NTFS partitions - 1(Y:), 2(Z:)

1. Set volume 2 as read only Diskpart showed that both volumes are read only (but not the disk) Volume 2 is locked properly (no option to change volume label, create new folder or paste) Volume 1 stayed open to writing Both volumes can't be formatted I put two big files on volume 1 and changed the volume label, explorer indicated the volume is now full and showed the new label Dismounted and remounted the VHD All changes made to volume 1 have been erased (the VHD file size stayed like before writing) Now both volumes are locked properly (can't write, change label or format)

2. Set volume 2 as read only Diskpart showed that both volumes are read only (but not the disk) Volume 2 is locked properly (no option to create new folder or paste) Volume 1 stayed open to writing Both volumes can't be formatted I put two big files on volume 1 and changed the volume label, explorer indicated the volume is full and showed the new label I removed the read only flag from volume 2 VHD gets resized to the proper size Dismounted and remounted the VHD All changes made to volume 1 stayed

3. Set disk as read only Diskpart showed that the disk is read only (but not the volumes) Both volumes are blocked to writing, can't change volume label. Formatting is blocked. Dismounted and remounted the VHD Diskpart showed that the disk is not read only (volumes didn't change) Both volumes are writable, and the label can be changed.

4. Set disk and volume 2 as readonly Diskpart showed that both disk and volumes are readonly Same behaviors as before

Conclusion: In order to block changing the label you must set as readonly the relevant volume. As the tests above shows, setting one volume as readonly set every other volumes that resides on the same disk, but they only take full effect on the other volumes after disconnecting and reconnecting the disk.

4
  • Could you please test this if it really works and provide a more step-by-step instruction? Nov 11, 2013 at 12:53
  • Are you sure that works ? AFAIK attributes applies only to volumes and readonly would make the entire volume(==partition) readonly.
    – Tonny
    Nov 11, 2013 at 13:04
  • I've been fumbling around whith that, nothing too serious too, because I wasn't too sure what I was doing, but it doesn't seem to just lock the name.
    – Sampaio
    Nov 18, 2013 at 23:15
  • I edited my post, take a look where it says "SECOND EDIT".
    – EliadTech
    Nov 21, 2013 at 21:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .