Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Crash Davis

macrumors member
Original poster
Feb 23, 2008
81
20
Austin, Texas
I can run the following command in terminal to mount an encrypted sparsebundle where the bundle password is stored in the keychain.

Code:
hdiutil attach '/Volumes/Backup/Mac1.sparsebundle'

I would like to have that command run on a schedule, so I'm using CronniX to create a cron job with that command. But, when it runs at the scheduled time, nothing happens. When I check the cron daemon mail in terminal, it says the following:

Code:
hdiutil: attach failed - Authentication error

I'm assuming that it isn't able to read the password from keychain? I don't know. Hoping somebody can shed some light on things, or point me in the right direction.

Thanks
 
You might be able to use -stdinpass in the cronjob line. This will us an unencrypted passphrase, so it's not the most secure method.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.