I’m having a problem with fstab on Server 18.04. I’m trying to mount a number of Windows Server network shares. If I put the username and password into each line of fstab and do sudo mount -a
, it works fine. However, when I try to use a “credentials” file, it all goes pear-shaped.
So this:
//server/share /mount/point cifs ro,auto,user=user,password=password 0 0
…works fine.
However, if I try this:
//server/share /mount/point cifs ro,auto,credentials=/etc/.smbcredentials 0 0
…with .smbcredentials
containing the following:
user=username
password=password
domain=domain
…this does not work. sudo mount -a -v
outputs the following:
/ : ignored
/boot/efi : already mounted
none : ignored
domain=mydomain
,prefixpath=Projects/XYZ,pass=********.168.1.10,unc=\server\share,user=username
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
168.1.10
is the partial IP address of the server on which the shares that I want to mount are located. It appears that the password is being concatenated onto the IP of the server.
So, what am I doing wrong? Any help would be much appreciated.