I can see my time capsule in network, but I am unable to get into it. Could someone help me to resolve the issue? The login information is correct, but getting errors shown in screenshots.
7 Answers
On Ubuntu 18.04, I saw the same screen as you have. Having tried various Google searches I found a command line solution. It is not a fully automated GUI solution... but this is Linux, right.
First prepare mount point (only one time):
$ sudo mkdir /media/$USER/capsule
Then every time you want to mount the capsule:
If you as I have the same username on both your Mac and Linux systems:
sudo mount -t cifs //10.0.1.1/Data /media/$USER/capsule -o username=$USER,sec=ntlm,uid=$USER,vers=1.0
Else:
sudo mount -t cifs //10.0.1.1/Data /media/$USER/capsule -o username=MyCapsuleUsername,sec=ntlm,uid=MyCapsuleUsername,vers=1.0
You will be asked for two passwords, the first from sudo
, i.e. your Linux password, the second from the capsule.
Note, I created an alias in my .bashrc
file for convenience.
Note, //10.0.1.1
is the default local IP address of your capsule, assuming you did nothing special when setting it up. You can check your router setup for the correct IP. /Data
is the name that you gave your time capsule, it might differ in your case.
Add this in global section /etc/samba/smb.conf:
[global]
...
client use spnego = no
...
You can mount it by command
gio mount smb://10.0.1.1/Data/
Or CTRL + L in nautilus and write full adsress
smb://10.0.1.1/Data/
-
thank you! but how do i do this automatically everytime i login into my desktop?– ggnoredoFeb 24, 2019 at 13:53
-
All the answers here lack unfortunately the following quite important information. The name that you gave your time capsule does not match with /Data
.
The name of the time capsule corresponds to the NetBIOS aka host name. So it can be used as an alternative to the IP address. Let's say it is "TC Peter". That would be translated by the Apple Airport Utility to TC-PETER
.
The value /Data
corresponds to the time capsule volume name. In this case this would be now "AirPort-Laufwerk Peter" which is equal to /AirPort-Laufwerk Peter
. In other languages this is of course different, so in English that would be /AirPort-Drive Peter
or /AirPort-Volume Peter
However, in my example this will give the following two possible commands:
sudo mount.cifs //TC-PETER/'Airport-Laufwerk Peter' /mnt/timecapsule/ -o password='yourpassword',sec=ntlm,uid=1000,vers=1.0
sudo mount.cifs //x.x.x.x/'Airport-Laufwerk Peter' /mnt/timecapsule/ -o password='yourpassword',sec=ntlm,uid=1000,vers=1.0
Note, the apostrophes are needed if the time capsule volume name contains a space!
The uid value of 1000
is correct in my case for Kubuntu 18.04. It may be different on other Linux Distros and users. Check it with command id -u <username>
.
This mounting command works fine when the Time Capsule is configured with a single password (device admin or network password). It not works when user-accounts are configured as access mode at the Time Capsule.
So that's it. I can confirm that it works PERFECTLY. It took me near days to figure this correct syntax stuff out. ;-)
Additional helpful information:
Install the needed packages:
sudo apt-get install cifs-utils
sudo apt-get install keyutils
Define your workgroup and enable NTLMv1 support in the smb.conf file:
sudo nano /etc/samba/smb.conf
workgroup = <yourworkgroup>
ntlm auth = ntlmv1-permitted
Additional fstab related addendum:
sudo nano /etc/fstab
Here follows two fstab config examples for automount at every reboot. I have it tested and they work GREAT.
//TC-PETER/Airport-Laufwerk\040Peter /mnt/timecapsule cifs _netdev,users,vers=1.0,sec=ntlm,password=yourpassword,rw,uid=1000,gid=1000,iocharset=utf8 0 0
//x.x.x.x/Airport-Laufwerk\040Peter /mnt/timecapsule cifs _netdev,users,vers=1.0,sec=ntlm,password=yourpassword,rw,uid=1000,gid=1000,iocharset=utf8 0 0
It should be noted that the strange \040
is needed when the share name contains a space. The previously used apostrophes don't work in the fstab syntax scheme!
Interestingly, the often proposed parameter auto
is non-functional and breaks the whole mounting command in my case. I have no idea why this is so. This may be because of parameter _netdev
. That one is network share related and delays the mounting until the network is up and active. However, I also found the information that the _netdev
flag has no function on newer systemd based Linux Distros. So it can be also left out. Whatever, the share is otherwise mounted immediately when it is selected. (No error message is present in dmesg.)
Further parameters are rw
, which allows read & write access. (Well, not all SMB share config examples include it, so that one may be optional). The iocharset=utf8
tells Linux to be UTF (Windows?) compliant. Also here, it may be (strongly?) recommended but not mandatory. Parameter vers=1.0
and sec=ntlm
are quite insecure but unfortunately absolutely necessary because Apple is using on their Time Capsules a very ancient SMB standard.
The feature users
allows the mounting / unmounting to all available Linux users while flag user
only allows it to the root / fstab owner account. This principle should be regarded as somewhat incoherent and may not work as expected on SMB shares. Note, all the files and folder created (by Linux users) at the SMB share will contain the uid=1000
and gid=1000
user values.
Some SMB fstab examples also use a nounix
flag,- it clearly defines that the share is non-Linux compliant. Well, in my case I didn't notice any difference whether I set it or not.
Finally, the really only unpleasant thing is that I have in dmesg
several notifications called CIFS VFS: bogus file nlink value 0
. Some suggest to set flag noserverino
to fix this. However, in my case with an Apple Time Capsule SMB1 share it didn't help anything, the notifications were still there. Whatever, because everything works as it should I simply ignore it. ;-)
I am on Ubuntu 21 and my Time Capsule runs in Bridged router mode and has user-based drives on it protected by username and password and also a shared drive. This is how I got it working thanks to answers above.
Drive = Name of drive User = Name of my linux user IP = IP of Time Capsule, I used Airport Utility on my iPhone to see this TCUser = Username on Time Capsule
sudo apt-get install cifs-utils keyutils
sudo mkdir /media/User/Drive
sudo mount.cifs //IP/'Drive' /media/User/Drive/ -o username=TCUser,sec=ntlm,vers=1.0
Works perfectly, to access other drives on Capsule just use other names for Drive
I would like to auto mount my networked capsule.
STEP 1: Install cifs-utils
$ sudo apt-get install cifs-utils
STEP 2: Add a line to fstab file
$ sudo nano /etc/fstab
and append the line below
//192.168.1.17/Data /media/capsule cifs user=John\040Doe,pass=this.is.capsule.pass,rw,uid=johndoe.from.other.pc.id,iocharset=utf8,sec=ntlm,vers=1.0 0 0
and 'user=John\040Doe'
\040
is the space. That's all.
I was able to schedule my Ubuntu to automatically mount the drive after 5 min from boot using the next steps:
Script:
#!/bin/bash
#
echo "mount -t cifs //YOUR TIME CAPSULE IP/Data /media/$USER/capsule -o username=Time Capsule user,pass=Time Capsule Password,sec=ntlm,uid=$USER,vers=1.0" | /bin/bash
Save the script on desktop, make the changes and save it without extension.
Preparing the mount points:
sudo mkdir /media/$USER/capsule
Copy the Script: copy the script "capsule" into /root folder and /usr/local/bin
$USER is the computer local user, must be change in the script
you may need to start nautilus with root rights, for that from a terminal run sudo nautilus
Install services;
sudo apt update
Install cifs-utils, samba and cron.
sudo apt-get install cifs-utils
sudo apt install samba
sudo apt-get install cron
Enable SMB1 support in Ubuntu:
Open /etc/samba/smb.conf
file on your Ubuntu server
Add the following statement in the global settings section of the file:
[global]
ntlm auth = ntlmv1-permitted
Restart the SAMBA server
sudo service smbd restart
Add the CRONTAB job, the drive will be mounted after 5 min from boot:
In terminal run:
crontab -e
(first time will ask you to choose the text editor to use, press 1)
At the end of the file add:
@reboot sleep 300 && /usr/local/bin/capsule
@reboot sleep 300 && /root/capsule
Now enable the crontab service
sudo systemctl enable cron.service
Start the crontab service
sudo systemctl start cron.service
Check the status
sudo systemctl status cron.service
you should see something like:
cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: >
Active: active (running) since Mon 2020-08-03 19:10:06 EEST; 26min ago
Docs: man:cron(8)
Main PID: 827 (cron)
Tasks: 1 (limit: 9446)
Memory: 2.7M
CGroup: /system.slice/cron.service
└─827 /usr/sbin/cron -f
aug 03 19:15:30 koszty CRON[867]: (CRON) info (No MTA installed, discarding out>
aug 03 19:15:30 koszty CRON[868]: (CRON) info (No MTA installed, discarding out>
aug 03 19:15:30 koszty CRON[867]: pam_unix(cron:session): session closed for us>
aug 03 19:15:30 koszty CRON[868]: pam_unix(cron:session): session closed for us>
aug 03 19:17:01 koszty CRON[3586]: pam_unix(cron:session): session opened for u>
aug 03 19:17:01 koszty CRON[3587]: (root) CMD ( cd / && run-parts --report /e*
On later versions of Ubuntu, Samba requires you to specify you want the old version with vers=1.0
(this previously was the default but no longer is). Without specifying this, trying to connect through Nautlius will result in the kFPAuthContinue
error.
I've written a full guide for Ubuntu 20.04 on this AskUbuntu post.