I am using pam-mount under Ubuntu Studio 22.0.4 to connect to several shared directories on my Synology NAS. It takes a long time, but these connections die after a while. This is not a network problem, the network continues to work fine after the network shares have disconnected. The network connection is also a wired Ethernet connection. Presumably these connections are being terminated by some kind of timeout, but I have no idea where it might be. The same directories mapped on a Windows 10 client do not disconnect (or if they do, they reconnect transparently on demand). I need to use pam-mount because of access control issues. Different users in the Ubuntu system have different shares mapped to the same Ubuntu directory as well as different access privileges for some shares used in common. Here is a sample line from /etc/security/pam_mount.conf.xml
for one of the shares that is disconnecting:
<volume sgrp="domain users@nas.rsbrux.ch" fstype="cifs" server="diskstation.nas.rsbrux.ch" path="private" mountpoint="/nas/private" options="sec=krb5,cruid=%(USERUID),noexec,rw,nofail" />
At the suggestion in matigo's comment below,I amended the lines as follows:
with the result that no shares were mapped at all.
How can I prevent it disconnecting?