Using Time Capsule Drives Under Linux

October 28, 2017

I’ve had such a hard time mounting my drive attached to the Time Capsule. There was just a minor thing missing from all the articles, stackoverflow articles and so on.

First things first: I’ve set up my Time Capsule to use only a device password, hence no user-password auth. If you actually do, you have to add user=$user to the options string.

If you don’t know at what IP the Time Capsule has:

λ arp -a
_gateway ( at 00:00:00:00:00:00 [ether] on enp2s0f0
EDEN ( at 00:00:00:00:00:00 [ether] on enp2s0f0

The output doesn’t have to look like that because I actually added my Time Capsule to the /etc/hosts file:

λ grep "EDEN" /etc/hosts	EDEN			eden 	eden.local

This way I can use the string EDEN instead of typing the ip. It goes without saying that these two are interchangeable. Now to mount the drive, we use the following:

# make the mount point
λ sudo mkdir /mnt/tc/MediaSlave

# mount the drive
λ sudo mount -t cifs //EDEN/MediaSlave /mnt/tc/MediaSlave -o "pass=$PASS,sec=ntlm,file_mode=0777,dir_mode=0777,vers=1.0"

# OR alternatively

sudo mount -t cifs // /mnt/tc/MediaSlave -o "pass=$PASS,sec=ntlm,file_mode=0777,dir_mode=0777,vers=1.0"

Two things to note here: using the host name “feels” faster. And if you forget file_mode and dir_mode, you end up with root-owned files and read-only or even execute-only permissions. Another option is to use uid=1000 instead of these two options. Then the files are owned by the account with id 1000 and group root. I guess that’s a tad more secure than world-read-writeable files. You can get your uid with the id command.

vers=.0 specifies the samba version to use. That’s what hindered me previously when trying to mount the drive. It would respond with things like host is down and so on. Adding said option fixes that.

To finalize & automate the mounting of the drive we create the following entry in /etc/fstab:

//EDEN/MediaSlave	/mnt/tc/MediaSlave	cifs	pass=$PASS,sec=ntlm,vers=1.0,uid=1000	0 0

Change uid to the options you want. If not already mounted, mount the drive now with mount -a. Voilá, that’s it!

comments powered by Disqus