Mount of same share fails on one OSMC but works on the other

I have two OSMC boxes and am preparing a new. So I looked at the settings of the two I have and I found a problem:
Both units have the same /etc/fstab entry for a video media share on my Ubuntu 20.04.4 LTS Server.
Yet the content of the share is visible only on one OSMC unit…
Here is the fstab entry:

//192.168.119.216/MSNBC /mnt/ubuntusrv cifs x-systemd.automount,vers=3.0,noauto,rw,iocharset=utf8,credentials=/home/osmc/.credentials,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770 0 0

The credentials file is the same content on both units (copy/paste), yet the second unit does not mount it.

$ ll /home/osmc/.credentials
-rw-r--r-- 1 root root 35 2022-05-25 19:46 /home/osmc/.credentials

The /mnt/ubuntusrv directory exists on both.

I have tried sudo mount -aon the problem unit and there is no error message yet the mount is not done (no files inside the /mnt/ubuntusrv directory.

What should I look for next?

Hi,

On the unit where the mount fails can you please issue:

sudo umount /mnt/ubuntusrv

This is to make sure there isn’t a already mounted error on the next command:

sudo mount -v /mnt/ubuntusrv

Please provide of the 2nd command?

Thanks Tom.

sudo mount -v /mnt/ubuntusrv
Credential formatted incorrectly: (null)
mount.cifs kernel mount options: ip=192.168.119.216,unc=\\192.168.119.216\MSNBC,vers=3.0,iocharset=utf8,file_mode=0770,dir_mode=0770,uid=1000,gid=1000,user=bosse,pass=********

So I looked more carefully at the two credentials file in nano and they looked exactly the same, EXCEPT:
On the failing OSMC device there was an extra empty line at the end of the file!!!
When I removed that extra line it started working. Both devices now have this connection up!

Thanks for the -v suggestion that displayed the error!

1 Like