Password on encrypted volume not being "forgotten"
I've set up an encrypted disk image (sparsebundle) and written a short bash script to simulate the old-style FileVault (to protect just a single account.) It uses a folder within the encrypted volume as the home folder of an account that I use for sensitive information. While it took a little while to get the permissions/ownership right on the volume and image, it works fine. The other tricky part was that I have the script close the volume after it detects the account has been logged out -- I discovered I needed to wait a while for the logout to complete before closing the volume (otherwise it seemed like the system was trying to read or write from the volume even after "who" showed the account was logged out, and so it created a new home directory that confuses things.) Now, the "problem" I have is this. The first time the script opens the encrypted volume the system of course asks for the password. Thereafter unless I reboot (logging in and out of the non-protected account I start the script from doesn't help) and possibly after a *long* time, tthe system seems to be remembering the password to the file -- on subsequent uses of the script the volume is opened without me being asked for the password. I have examined carefully what I do when entering the password to make sure it's not saved in the keychain -- and indeed it isn't (verified by looking at the keychain). Does anyone have any idea where the system (presumably the Finder) is saving the password and how to get it to "forget" it? (I just realized I haven't checked to see if the password is "remembered" system-wide or just in the un-protected account.) I've looked in both the system and account set of caches and nothing is obvious (all the finder cached data is in a single database, presumably in some obscure format.)
Ted Lee
Minnetonka, MN
MacBook Pro (Retina, 13-inch, Late 2012), OS X Mountain Lion (10.8.3), also a desktop G4 and an early mini