Wednesday, May 8, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 9454  / 3 Years ago, mon, july 5, 2021, 4:38:51

I want to mount a directory on a file server at startup. This is my /etc/fstab entry:



# mount the fileserver
https://fsrv.company/ /mnt/fileserver davfs user,auto 0 0


Manually mounting it with mount /mnt/fileserver works fine. However, because of an outdated certificate this issues a prompt which I always have to answer with yes:



/sbin/mount.davfs: the server certificate does not match the server name
/sbin/mount.davfs: the server certificate is not trusted
[...]
Accept certificate for this session? [y,N] y


This device should be mounted when starting Ubuntu (due to the auto option). However, the device is not mounted, probably because of the required input. The owner of the fileserver wont update its certificate.



How can I automate this process, such that the device is mounted at startup with the answer being always y
?



EDIT: I did download and place the certificate in .davfs2/certs/ and edited the entry in .davfs2/davfs2.conf (as hinted below by @Oli), but the interactive input remains.


More From » mount

 Answers
0

In my case I used the code highlighted by Oli above and then used the trust_server_cert option in the dav2fs config.




Usefull when the server's certificate can't be verified or is
even invalid, but you know that you can trust this certificate.




So edit /etc/davfs2/davfs2.conf and add a line that looks like the following:



trust_server_cert        /etc/davfs2/certs/my.selfsigned.cert.pem


This allowed me to mount a self-signed OwnCloud webdav even when the certificate host didn't match.


[#24403] Monday, July 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
disdry

Total Points: 133
Total Questions: 128
Total Answers: 109

Location: Greenland
Member since Fri, Jul 31, 2020
4 Years ago
;