Pergunta

I've got an encrypted sparse bundle disk image and I've used fstab with the right UUID to mount it someplace other than /Volumes. What I would like is to just dbl-click on it, enter the password and have it show up where I want it. I use a password manager and I have intentionally chosen a long random gibberish password for the disk image. It seems that I am not allowed to paste my password into the dialog that asks for a password when mounting an encrypted disk image.

Am I doing something wrong?

Foi útil?

Solução

No, you aren't doing anything wrong. Apple doesn't allow you to paste into certain secure dialog boxes. It's a feature, not a bug. (It makes a brute force hack of the dialog box more difficult.)

You can paste the password into the command line if you mount the secure image using hdiutil.

Open Terminal and type:

 hdiutil attach /path/to/imagefile -stdinpass

When prompted for the password, copy it from a text file or (preferably) a password vault and paste it into terminal.

If the path/to/imagefile is complex, you can type the command, a space, then drag the imagefile icon from the finder into the terminal window to automatically enter the path/filname.

Outras dicas

I wrote a very tiny AppleScript application which allows you to paste passwords even where its not allowed by tricking the system into thinking that you're typing on your keyboard. The downside: it takes space in your Dock.

You could also run a script like this in AppleScript Editor:

tell application "System Events" to tell process "SecurityAgent"
    set value of text field 1 of window 1 to (the clipboard)
    click button 1 of group 1 of window 1
end tell

It requires access for assistive devices to be enabled from System Preferences.

Apple's security prevents this as answered separately by jaberg. But are you not prompted to store the password in your keychain? I've only used encrypted physical volumes and not disk images, but I'm always prompted to store the password to my keychain.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a apple.stackexchange
scroll top