Hey guys
Thanks a lot for these valuable instructions. Initially, automatically mounting didn't work for me but now it's resolved. Since it cost me some time, I would like to share my experience, possibly helping others.
Manually mounting worked fine from beginning:
Code: Select all
sudo mount.cifs //10.0.1.1/WD_2GB /media/WD_2GB -o user='pi',pass='XXXXXX',sec=ntlm
Verifying:
Code: Select all
ls /media/WD_2GB
sudo mkdir /media/WD_2GB/testDir
ls /media/WD_2GB
Unmounting:
Trying to port the same lines as above to fstab:
Code: Select all
sudo nano /etc/fstab
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
//10.0.1.1/WD_2GB /media/WD_2GB cifs user='pi',pass='XXXXXX',sec=ntlm
UUID=2b8e5a88-ba38-440a-a1aa-49611b44e797 /mnt/usb_WD_1TB ext4 nofail,defaults 0 0
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
sudo mount -a
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
dmesg | tail
[ 2532.335862] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[ 2532.335909] CIFS VFS: Send error in SessSetup = -13
[ 2532.336356] CIFS VFS: cifs_mount failed w/return code = -13
After fiddeling around a bit, I learned that the '' work for command line, but not within config scripts. Omitting them
resolved the issue:
Code: Select all
sudo nano /etc/fstab
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
//10.0.1.1/WD_2GB /media/WD_2GB cifs user=pi,pass=XXXXXX,sec=ntlm
#//10.0.1.1/WD_2GB /media/WD_2GB cifs user='pi',pass='XXXXXX',sec=ntlm
UUID=2b8e5a88-ba38-440a-a1aa-49611b44e797 /mnt/usb_WD_1TB ext4 nofail,defaults 0 0
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
sudo umount /media/WD_2GB
ls /media/WD_2GB/
sudo mount -a
ls /media/WD_2GB/
Probably any UNIX/LINUX intermediate knows about about these restrictions, but being relatively new (as perhaps lots of Raspbians) it was not too obvious to me.
Good luck!
anerni
PS: In case anybody knows a way how to replace the explicit IP address of Airport Extreme by its hostname, I would be grateful. Up to now, I only found threads stating that it didn't work with the hostname and they were marked resolved after using the IP. But since my network uses dynamic IP's, this is not the preferred solution (since I use several Airport Extreme in the same network, it might be possible that the IP address of one device might chance at a later time).