Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Access FileVault sparseimages via ssh' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Access FileVault sparseimages via ssh
Authored by: aranor on Mar 04, '04 11:46:32AM
In 10.3, hdid really only exists for backwards compatibility, and you should use hdiutil instead. To mount it anywhere you want, try hdiutil -stdinpass attach /Users/username/username.sparseimage -mountpath /Users/username (Note that I haven't tried this, but the man pages say that's how you mount at a path outside of /Volumes)

[ Reply to This | # ]
Exactly as FileVault does it
Authored by: ajbaker on Dec 15, '05 04:16:30PM
After reading this entire thread, I was still left a little concerned. All of the tips result in the sparseimage being mounted as a device. This means the disk image is mounted on each users desktop with full write access! (Hardly a smart move.)

Thus I set about the quest of discovering exactly how FileVault does it. Surprisingly I couldn't find anything accurate online.

This however I think solves all the problems:

hdiutil attach /Users/username.sparseimage -stdinpass -owners on -mountpoint /Users/username -nobrowse

The differences are:
the disk image path has to go immediately after the verb attach;
-owners on specifies the permissions on the disk image should be respected;
-mountpoint is used instead of mountroot;
-nobrowse means the image is not mounted as a device in the Finder and thus not displayed in front of every user.

[ Reply to This | # ]