Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I made a TrueCrypt partition on a USB drive.

I can mount it fine but only using admin password, either via the graphical interface or via sudo truecrypt --auto-mount=devices. This is preventing me from using it for an automated backup. Mounting TC volumes contained in files on already mounted volumes presents no such requirement.

Is it possible to mount a Truecrypt partition volume in userspace on Mac, or otherwise without asking for password?

share|improve this question
    
If you want to access it without using a password, why do you encrypt it? I don't know the workings of TrueCrypt, but if the partition is encrypted then a password should always be required. Also is there no option to "Add password to keychain" when you type it? –  Tiago Veloso Sep 7 '09 at 12:02
    
I'm pretty sure he means the computer's admin password, as opposed to the passphrase used to encrypt the TC container. –  Shane Sep 7 '09 at 17:10
1  
Shane is correct -- the problem is admin password, not volume password. The volume does not have a password, it is accessed using a keyfile in my (also encrypted) home directory. –  ttarchala Sep 7 '09 at 17:35
add comment

2 Answers

The reason TrueCrypt requires your administrator password is that it uses low level commands to create the proper devices and mount the filesystem and these commands in turn require root access (which the administrator acquires indirectly via sudo).

To avoid this, it's possible to use the "sudoers" file to give the right to a given user/application combination (in this case you/truecrypt) to automatically be run as root.

Log in as an administrator, then type the following command in a Terminal:

visudo

then add these two lines:

# Allow TrueCrypt run under user "XYZ" to run as root without asking for a password.
XYZ ALL=NOPASSWD: /Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt --core-service

Of course, replace "XYZ" by your user account name. Note that this opens a security hole since TrueCrypt will then have full access to any device you will mount your encrypted volume on. I have no idea how hard this would be to exploit though...

A few useful references:

share|improve this answer
add comment

You could create a SUID script that has permissions to do this.
However, be warned about its insecurities in general.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.