3

I'm looking for a file sharing protocol that.

  • has client software for ubuntu and mac os x
  • has server software for ubuntu.
  • lets me mount encrypted file partitions using pam_mount. (or something similar)
  • allows random access

What doesn't work

FTP

There's no random read access.

Samba

Doesn't allow me to mount my encrypted partitions with pam_mount, because the password isn't sent in clear. (And encrypting the volume with the stored hash is pretty insecure because the hash is weak.)

4 Answers 4

2

Plaintext password doesn't have to be a requirement. If the file server runs SSH, script a ssh host mount /dev/encrypted_disk ... just before accessing the filesystem. (If you use pam_mount on your local system too -- add a pam_exec.)

5
  • That's a possibility I'm considering. Given that fact that it's also going to act as a backup disk it would be nice if that worked without any user intervention though. So SSH'ing to the server is suboptimal. Oct 28, 2010 at 21:27
  • You can SSH without user intervention - it requires you to use keys instead of passwords
    – Broam
    Oct 28, 2010 at 21:34
  • @Broam: Which it turn makes it impossible to decrypt the partition, because the password is used as the key for it. Oct 29, 2010 at 5:31
  • @Georg: Not necessarily. You use keys for SSH authentication, but then pass the PAM password to a program being ran over SSH. This could be achieved using pam_ssh.so to unlock the SSH keys, and pam_exec.so expose_authtok ssh remotehost mount blahblah to mount the remote filesystem. (expose_authtok will make pam_exec.so give your login password to ssh through stdin, to be consumed by remote mount. It's a relatively new addition to Linux-PAM, though.) Oct 29, 2010 at 19:14
  • If I understand you correctly, this is what happens: You log in and the computer automatically sshs to the server. That means, I actually don't need to use keys, because this works only on login (using gdm, ssh, ...) Basically, this is mount-on-login. Did I understand that correctly? (I'm using pam_mount at the moment to mount the encrypted partitions on the server on SSH login anyway, but that works only for password-logins obviously.) Oct 31, 2010 at 13:45
1

Have a look at NFS.

2
  • I did. Is there a simple way of configuring it without going crazy? Oct 28, 2010 at 20:19
  • I just read a little bit about how authentication works with NFS. Apparently one has to use a separate kerberos server. Doesn't this mean that pam_mount won't work because the password is never sent to the file server? Oct 28, 2010 at 20:56
0

I'd probably use either SMB or NFS with an SSH tunnel.

Watch out with NFS though. I've had a lot of problems with it on OSX using large files. The OSX client will try to cache a 4GB file in memory then the OS runs out of mememory and starts paging like mad and thrashes the HDD. The entire computer becomes unresponsive.

0

The simplest way is to use SFTP. I initially thought it wouldn't allow random read/write access, but it does.

Not the answer you're looking for? Browse other questions tagged .