image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old June 13th, 2008, 09:05 PM
Hippo Man
 
Join Date: Dec 2006
Posts: 110
Thanks: 2
Thanked 1 Time in 1 Post
Hippo Man is on a distinguished road
Supplying a password to "open" without a GUI-based dialog box?

I have created an encrypted disk image that I want to open the command line, using the open program. I issue the open Image.dmg command, at which time a dialog box pops up on the screen, prompting me for the encryption password. However, what I'd like to do is issue the password without a GUI-based password dialog.

Is this possible? If so, how?

The reason I want to do this is because I ssh into my Mac from a remote Linux box, and I can only run command-line utilities. I'd like to open the volume from within this remote connection.

Thanks in advance for any suggestions you can offer.
.
Reply With Quote
  #2  
Old June 13th, 2008, 09:53 PM
Mikuro's Avatar
Crotchety UI Nitpicker
 
Join Date: Mar 2005
Posts: 2,498
Thanks: 4
Thanked 15 Times in 14 Posts
Mikuro is on a distinguished road
Apple has a powerful command-line utility for manipulating disk images calld hdiutil. The simple usage for mounting an image is this:

Code:
hdiutil attach myimage.dmg -stdinpass
The "-stdinpass" makes it give you a prompt to enter a password for the dmg in Terminal (similar to using sudo).
__________________
Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.5

Useful programs: Privoxy, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc
Reply With Quote
  #3  
Old June 14th, 2008, 04:25 AM
Hippo Man
 
Join Date: Dec 2006
Posts: 110
Thanks: 2
Thanked 1 Time in 1 Post
Hippo Man is on a distinguished road
Thanks! This works for me.
Reply With Quote
Reply

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 03:43 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.