Ubuntu – samba share in /etc/fstab is ignored during mount -a but manual mount works

fstabmountsambaUbuntu

It's one of these problems I'm running into every time that I set up a server 🙁
I have an Ubuntu server 16.04 and would like to auto-mount a samba share.

In my /etc/fstab I have the entry:

//10.10.2.2/share    /media/share    cifs    defaults,_netdev,noauto,nofail,username=user,passwd=pass    0    0

When I execute

sudo mount -a 

I get no error message but the share is not mounted 🙁

The most interesting part however is that if I do a

sudo mount /media/share

The share is mounted

I had various problems with samba before but this behavior is new for me. Does anybody have an idea how to address this issue?

Best Answer

That's normal behaviour if you set noauto. From man mount:

noauto Can only be mounted explicitly (i.e., the -a option will not cause the filesystem to be mounted).