Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Hardware > Mac Peripherals

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 11, 2007, 11:20 PM   #1
HermanTheGerman
macrumors member
 
Join Date: Apr 2006
How To: Password-Protect The Access To An External Hard Drive?

The title says it all...
HermanTheGerman is offline   0 Reply With Quote
Old Jan 13, 2007, 11:08 AM   #2
applelabs
macrumors member
 
Join Date: Jan 2007
Send a message via AIM to applelabs
I looked around but couldn't find anything.
You could attach an AppleScript to the external hard drive. This would keep out the non computer savvy but it's possible to remove attached scripts without typing in a password.


If you deiced to do this this is what you do:

Open Script Editor.
Copy and past this code into the Script Editors window.
Code:
on opening folder this_folder

	set the_password to "iwantin" --set this to your password you want to use.
	set secret_folder to "secret stuff" --set this to a folder inside of your external hard drive. This is where you need to protected files.

	tell application "Finder"
		activate
		close window of this_folder
	end tell
	set the_prompt to "Please enter your password:"
	repeat
		tell current application
			activate
			display dialog the_prompt default answer "" buttons {"Cancel", "OK"} default button 2 with icon 0 with hidden answer
			if the text returned of the result is the_password then
				exit repeat
			else
				beep
				set the_prompt to "Incorect." & return & "Please enter your password:"
			end if
		end tell
	end repeat
	
	--set this_folder to "FLASH DRIVE"
	tell application "Finder"
		activate
		open folder ((startup disk as string) & "Volumes:" & (the name of this_folder as string) & ":" & secret_folder & ":")
	end tell
end opening folder
Edit the line:
set the_password to "iwantin"
Change "iwantin" to you password of choice.

Edit the line:
set secret_folder to "secret stuff"
You have to create a folder inside of your external hard drive and put all you stuff there. This is the only folder you will be able to accesses.

Save it as a script in "your username/Library/Scripts/Folder Action Scripts" (or anywhere really)

Plug in your external hard drive.

Right click (ctrl click) it and select "Enable Folder Actions". If it's not there then skip this step.

Right click it again and select "Attach a Folder Action…"

You will then be asked to select a scrip to attach. Navigate to where you saved the script above and click "Choose".

Now try and open the external hard drive and see what happens.

Last edited by applelabs; Jan 13, 2007 at 11:25 AM.
applelabs is offline   0 Reply With Quote
Old Jan 13, 2007, 11:39 AM   #3
n-abounds
macrumors 6502a
 
Join Date: Mar 2006
You could use disk utility to make a new disk image the size of your entire ext. HD. Then you could simply set it so that is has a password.
n-abounds is offline   0 Reply With Quote
Old Nov 4, 2008, 07:46 PM   #4
wawie
macrumors newbie
 
Join Date: Nov 2008
Quote:
Originally Posted by applelabs View Post
I looked around but couldn't find anything.
You could attach an AppleScript to the external hard drive. This would keep out the non computer savvy but it's possible to remove attached scripts without typing in a password.


If you deiced to do this this is what you do:

Open Script Editor.
Copy and past this code into the Script Editors window.
Code:
on opening folder this_folder

	set the_password to "iwantin" --set this to your password you want to use.
	set secret_folder to "secret stuff" --set this to a folder inside of your external hard drive. This is where you need to protected files.

	tell application "Finder"
		activate
		close window of this_folder
	end tell
	set the_prompt to "Please enter your password:"
	repeat
		tell current application
			activate
			display dialog the_prompt default answer "" buttons {"Cancel", "OK"} default button 2 with icon 0 with hidden answer
			if the text returned of the result is the_password then
				exit repeat
			else
				beep
				set the_prompt to "Incorect." & return & "Please enter your password:"
			end if
		end tell
	end repeat
	
	--set this_folder to "FLASH DRIVE"
	tell application "Finder"
		activate
		open folder ((startup disk as string) & "Volumes:" & (the name of this_folder as string) & ":" & secret_folder & ":")
	end tell
end opening folder
Edit the line:
set the_password to "iwantin"
Change "iwantin" to you password of choice.

Edit the line:
set secret_folder to "secret stuff"
You have to create a folder inside of your external hard drive and put all you stuff there. This is the only folder you will be able to accesses.

Save it as a script in "your username/Library/Scripts/Folder Action Scripts" (or anywhere really)

Plug in your external hard drive.

Right click (ctrl click) it and select "Enable Folder Actions". If it's not there then skip this step.

Right click it again and select "Attach a Folder Actionů"

You will then be asked to select a scrip to attach. Navigate to where you saved the script above and click "Choose".

Now try and open the external hard drive and see what happens.
....................................

Hi i came and saw your post and im interested to put a pass on my folder. so i did fallow the step and instruction you provided, but i have no success on getting up and running. can you plz tell what am i doing wrong. here's the script i made.

on opening folder this_folder

set the_password to "*******" --set this to your password you want to use.
set secret_folder to "Documents" --set this to a folder inside of your external hard drive. This is where you need to protected files.

tell application "Finder"
activate
close window of this_folder
end tell
set the_prompt to "Please enter your password:"
repeat
tell current application
activate
display dialog the_prompt default answer "" buttons {"Cancel", "OK"} default button 2 with icon 0 with hidden answer
if the text returned of the result is the_password then
exit repeat
else
beep
set the_prompt to "Incorect." & return & "Please enter your password:"
end if
end tell
end repeat

--set this_folder to "FLASH DRIVE"
tell application "Finder"
activate
open folder ((startup disk as string) & "Volumes:" & (the name of this_folder as string) & ":" & secret_folder & ":")
end tell
end opening folder

................................

canyou tell if im doing somthing wrong or do i have to erase somthing or change. i did enable the folder action and attach the script and tried it nothing happen it still let me access the folder.
wawie is offline   0 Reply With Quote
Old Dec 14, 2010, 03:08 AM   #5
nineeyes
macrumors newbie
 
Join Date: Dec 2010
Removed all folder actions for my external hard drive! HELP!

On a related note,

I was attempting to add a password protection to my external HD and somehow managed to make it so that the hard drive icon doesn't appear on the desktop or in finder and I REALLY need that data!

I can tell the computer still knows it's there because if I unplug it incorrectly a message pops up alerting me.

Any ideas???
nineeyes is offline   0 Reply With Quote
Old Dec 14, 2010, 03:12 AM   #6
penter
macrumors 6502a
 
penter's Avatar
 
Join Date: Jun 2006
Send a message via AIM to penter Send a message via MSN to penter
the first reply seems to have been made a really savvy user.
I've seen WD (Western digital) drives with password protection. They have proprietary software to make that happen. You might want to check out hose they do it, and perhaps reverse-engineer that? But that's assuming you can do that. Which from the looks of it, doesn't seem to be assuming too much
__________________
jaded fanboy
penter is offline   0 Reply With Quote
Old Feb 22, 2011, 12:17 PM   #7
AFPoster
macrumors 65816
 
Join Date: Jul 2008
Location: Charlotte, NC
I use WD Smartware
__________________
2012 15" MacBook Pro 2.3Ghz i7
iPad 2 32gb (white)
iPhone 5s 16gb x2
AFPoster is offline   0 Reply With Quote
Old Apr 3, 2011, 02:05 AM   #8
Mala
macrumors 6502
 
Join Date: Nov 2003
Can you use an encrypted disk image as a backup disk?

A friend has just had her computers stolen, and they had all kinds of personal information on them - not just hers, but her clients'. The robbers also took her backup drives.

In response to hearing this, I have my computer set to ask for an admin password when woken from sleep of more than a few minutes. But I back up once a week using Time Machine. I'd like to protect my backup drive in case of robbery.

It seems to me that I can't back up to an encrypted disk image - am I wrong?
Mala is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Mac Peripherals

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
How do I transfer music from an external hard drive on to my computer? MJNBGA Mac Applications and Mac App Store 6 Sep 3, 2013 12:42 AM
External hard drives on network not recognized scisport iMac 2 Mar 18, 2012 08:08 AM
External Hard Drive Suggestions rabsparks iMac 9 Dec 30, 2011 12:09 AM
Cannot format my WD MyBook Essential External Hard Drive - showing error crmpicco Mac Peripherals 6 Feb 21, 2011 07:57 AM


All times are GMT -5. The time now is 01:34 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC