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

Click here to return to the 'Exactly as FileVault does it' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
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 | # ]