Score:0

How to stop network shares from disconnecting

lk flag
R B

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?

in flag
PAM has a `reconnect` option, which is not part of your definition. If you prefix your `options=""` with `reconnect`, that may give you what you need
R B avatar
lk flag
R B
@matigo Thanks for the suggestion. Unfortunately, when I added "reconnect," to the beginning of the options list (before "sec=") the result was that none of the network shares mounted at all!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.