I have several folders on my NAS set to automount on my Xubuntu laptop at boot, using a saved credentials file. Each one has an fstab entry that looks like this:
# NAS home //192.168.1.111/Home/ /home/username/mountpoint cifs credentials=/home/username/nas.creds,uid=1000,gid=1000 0 0
This works perfectly when the laptop is connected to Ethernet on boot. However if not (as will almost always be the case) then the shares fail to mount. They are still visible on the desktop/file manager but if I attempt to open them a message pops up that they can only be mounted by root.
If I then use
sudo mount -a then the shares mount as usual.
My understanding is that this happens because fstab is executed some time before a Wi-Fi connection to the network is established, meaning the mounts fail.
sudo mount -a to the startup apps won't work as it requires a password.
So, what is an appropriate method to ensure that the shares mount after a Wi-Fi connection is established?