Fstab volumes not mounting at boot


Seems that fstab is not auto mounting my servers smb shares at bootup. This is the entry I have added:

# Mount Server Shares
// /mnt/share-name cifs credentials=/home/username/.smbcredentials,_netdev,rw,uid=1000,gid=1000,vers=2.1 0 0

The .smbcredentials file is in this format:


I have confirmed the user/pass is correct and that the corresponding directories are in /mnt.

Is there something wrong in this configuration, or am I missing something else?

Try running sudo mount /mnt/share-name and see if you get an error. That will try to mount with the data from /etc/fstab

No error, it mounted fine that way

Have you tried moving the credentials file outside of your home directory?

Is it possible that the file isn’t available at the time it is trying to mount it?

For the record, I use systemd-automounts for network locations as it is more reliable for me.

// /mnt/share-name cifs x-systemd.automount,x-systemd.idle-timeout=1min,rw,uid=1000,gid=1000,credentials=/home/username/.smbcredentials,iocharset=utf8,vers=2.1 0 0
1 Like

I changed to the “x-systemd” verbiage and still doesnt mount at boot. Also moved the .smbcreds to the / level, no change.

It does seem to now mount whenever the /mnt/share-name folder is accessed. For example, if I do “ls /mnt/share-name” it mounts the share. Or if I access that directory via an app, like Gimp, “File/Open…” it mounts the share automatically.

That is how a systemd-automount works. It mounts it on access. The great thing about that is that if anything is wrong or if you lose connection everything continues to work and then it just remounts it when you try to access it again.

Ok cool… Kinda has the same result in the end. I’ll try this and see how it goes…

Thanks for the help!