Sunday, 7 September 2014

Mounting Apple Time Capsule share from Ubuntu 14.04

Older Apple Time Capsule NAS devices don't support NTLMv2: only NTLM.  So when mounting an SMB share from such a device, you need to manually select NTLM as your security mode. Otherwise the CIFS Client fails to mount the share, and reports a permission error.

So, the correct syntax for Ubuntu 14.04 is:-
   sudo mount -t cifs // -o username=example,password=example,sec=ntlm /mnt/example

where is the IP address of your Time Capsule.

If the CIFS client isn't installed on your Ubuntu box then first you just need to run:- 
    sudo apt-get install cifs-utils

For bonus points you can of course pass the login credentials from a protected file in your home directory rather than passing it on the command line (where it's visible in process listings and bash shell history files).

If you're not sure of the mount point name,  ask first:-
   smbclient -U example -L //
   Enter example's password: 

... and a list of shares will be shown.  You want the one of type "Disk".


  1. Question, If I reboot, will the share unmount?

    1. Hi Pedro. Yes they will unmount. If you want persistence across reboots, you will need to add a new line in /etc/fstab . Just be careful when editing that file! Don't corrupt any existing entries or your system might not boot again. See "man fstab" or

    2. @Martin I just ran across this post.. a year later. I realized I did not thank you. Thanks for the info.

  2. you rock man, thank you for this entry blog...

  3. Hello Martin, i have try this but i have this error:

    Retrying with upper case share name
    mount error(6): No such device or address
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

    Any idea???

    1. Need to see exact syntax to debug that!

      But take care to use quotation marks or backslashes if you have special characters (including spaces) in the share name or the mount point name

    2. Hi Anthony... I saw your note. Your commands look fine. Is definitely the Time Capsule? Is "Enable file sharing" definitely ticked in Airport Utility, on the Time Capsule under "Disks" ?

    3. Same thing happened to me. I was querying the Samba server via the nmlookup '*' command to extract the IP of the shares; however it seems that nmblookup is not working as expected from quite some time (back in February it was OK).

  4. Interesting. I'll re-test from Ubuntu 16.04, first taking any pending updates for the Time Capsule.

  5. I was using Kodi in 14.x with my Airport and Timecapsule, this was working fine. Now in 16.04 I'm not able to make it work, even doing different sort of tricks. Any help would be greatly appreciated.

  6. OK to confirm the IP, this works... (if your time capsule is called "capsule")

    $ nmblookup capsule capsule<00>

    This works for listing the share points (from 16.04 to Time Capsule)...

    $ smbclient -U example --option='client use spnego = no' -L capsule
    WARNING: The "syslog" option is deprecated
    Enter example's password:
    Domain=[INTERNAL] OS=[Apple Base Station] Server=[CIFS 4.32]

    Sharename Type Comment
    --------- ---- -------
    IPC$ IPC
    Data Disk
    Domain=[INTERNAL] OS=[Apple Base Station] Server=[CIFS 4.32]

    This confirms that the share point name in this case is "Data".

    For actually mounting the share, this works...

    $ mkdir /tmp/mnt
    $ sudo mount // -o'sec=ntlm' /tmp/mnt
    Password for root@// ********

    That seems to work but it needs the IP address not the hostname!

    Hope this helps

  7. Owesome Martin!!!
    This work for me!!!
    Can we do a automount?

  8. Yes you should be able to add an entry to the bottom of /etc/fstab - googling that is left as an exercise for the reader. Only snag is that any login credentials will be readable by anyone who can see /etc/fstab . I don't know if that's world-readable, or needs to be,

  9. Hi Martin. I am trying to connect to my TC from a raspberry pi. When I use:
    sudo mount.cifs // /home/pi/timecapsule/ -o “user=xxxx,pass=xxxx,sec=ntlm”
    I get:
    Password for root@//

    Any help would be appreciated greatly!

  10. Hi, well if you enter the TC password when it prompts you, it will probably let you in!

    But if you want to get in without entering the password at the prompt, you might need single quotes rather than double quotes i.e. -o 'user=xxxx,pass=xxxx,sec=ntlm' - it may depend on whether your password has any characters in it that have special meaning in the Linux shell.

    Hope this helps

  11. I used this:
    // /media/airport cifs password=<($MyAirPortPasswd)>,uid=1000,sec=ntlm,user 0 0

    I replaced the password for securities sake
    and it said mount error permission denied

    1. OK so firstly /media/airport must exist already. And unless you are root (or you are sure that your user account has read/write/execute permissions on that folder) you might want to use "sudo mount" rather than just "mount" to make sure you don't get permission denied due to filesystem permissions on the local mount point.

      I can't recall whether non-root users can actually mount anything without special admin privileges so certainly try being root or using sudo.

      I'm not sure that you've got the options list correct. I would try sticking more closely to the examples. For one thing you haven't got '-o' before the password= option. I also don't see why you should need to override the UID option - that could cause a permission denied by itself unless you're root.

      As a last resort you might want to lose the space in the share name (TooneTown Media) or at least use the shell to escape it i.e. //\ Media in case the %20 gets treated as a space by the shell - meaning that the number of parameters is wrong.

      Hope this helps


Spammers: please stop wasting my time. All comments are moderated before publication.