noauto causes the share never to be mounted by the system, only on user request via the
mount command. So your observation that “it works manually but not in fstab” is exactly how
noauto is supposed to work.
What @fbartels proposes is to use systemd’s automatic mount facility. This means that the share will be mounted automatically each time any software tries to access the mount point, e.g. a simple
ls or trying to open a file from there.
This has several advantages:
- The user account doesn’t have to resolvable during boot.
- The mount attempt is only made when software needs access to the mount point; therefore it isn’t slowing down the boot process.
- The remote server doesn’t have to be reachable during the boot process, only when software needs access to the share.
- Intermittent network outages (= the remote server not being reachable) can be recovered from nicely as another mount attempt made whenever software accesses the mount point (the
fstab variant is only tried once during boot but never again afterwards).
Trying to mount via
fstab is simply the wrong tool for the job (like using a screwdriver to drive in a nail). Yes, it can get the job done under certain conditions, but there are better ways (e.g. use a hammer instead of the screwdriver).