I have problem mounting a network drive with fstab -> mount -a executed in bash.

My fstab looks like this:

//raspberrypi/NASHDD1/Download2/ /mnt/torpi/nashdd1/Download2/ cifs credentials=/home/balu/.torpi_smbcredentials,iocharset=utf8,sec=ntlm 0 0


# mount -a
mount error(13): Permission denied

however, this will work just fine:

sudo mount -v -t cifs //raspberrypi/NASHDD1/Download2/ /mnt/torpi/nashdd1/Download2/ -o credentials=/home/balu/.torpi_smbcredentials


mount.cifs kernel mount options:

My raspberry pi smb.conf looks like this:

   comment = my comment
   path = /media/pi/NASHDD1     
   browseable = yes
   read only = no
   public = no
   create mask=0777
   directory mask=0777

I can reach said drive from both Nemo and from Windows explorer Now I am not a professional when it comes to Linux, so any insight in what I am missing is greatly appreciated.

P.S.: I read about a ton of threads hear about this error, but no avail.


You need to ensure your /etc/fstab entry actually matches the mount command that works.

You've shown that this works:

sudo mount -v -t cifs //raspberrypi/NASHDD1/Download2/ /mnt/torpi/nashdd1/Download2/ \
    -o credentials=/home/balu/.torpi_smbcredentials

However, in your /etc/fstab entry you've got an outdated sec=ntlm setting. Remove that and it's probable all will be well:

//raspberrypi/NASHDD1/Download2/ /mnt/torpi/nashdd1/Download2/ cifs
    credentials=/home/balu/.torpi_smbcredentials 0 0

Split here over two lines for readability. In fstab this must be a single line.

As a little hint, whenever you get an error in this client-server kind of situation it's always worth checking the server error logs. The client will get told simply "No.", but the server will record the actual details, "No such user" or "Password expired" (just examples). This is true not only of SAMBA but also services such as ssh.

  • Thank you. I have tried ntlmv2 as well, but it did not occur to me that this might be the cause of the error. This solved my problem! – itarill Sep 11 '17 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.