Quantcast
Channel: Slow login when CIFS mounts are unavailable - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

Slow login when CIFS mounts are unavailable

$
0
0

I installed a PC with Ubuntu 14.04, Sssd and accounts in our OpenLDAP directory.

Network shares residing on our Samba server are mounted automatically when a user logs in, through pam_mount configuration (/etc/security/pam_mount.conf.xml):

        <!-- Volume definitions -->
<volume options="nodev,nosuid" user="*" mountpoint="/media/share1" path="share1" server="ourserver.ourdomain" fstype="cifs" />
<volume options="nodev,nosuid" user="*" mountpoint="/media/share2" path="share2" server="ourserver.ourdomain" fstype="cifs" />
<volume options="nodev,nosuid" user="*" mountpoint="/media/share3" path="share3" server="ourserver.ourdomain" fstype="cifs" />
<volume options="nodev,nosuid" user="*" mountpoint="/media/share4" path="share4" server="ourserver.ourdomain" fstype="cifs" />
<volume options="nodev,nosuid" uid="%(USERUID)" mountpoint="/media/home_%(USER)" path="%(USER)" server="ourserver.ourdomain" fstype="cifs" />

Every user has the same password for her/his LDAP account and all the CIFS shares.

This setup works fine in a nominal case. The great benefit is that pam_mount asks for the password only once and passes it over to the other PAM modules.

However, if the PC is connected to a foreign network (so the Samba server is inaccessible), it times out for about 10s per share at login, whether in the default graphical console or in a text console. With the current 5 mounts, this means about 1 minute delay to log in.

UPDATE: Here are the error messages seen when logging into a text console:

[  465.088270] CIFS VFS: Error connecting to socket. Aborting operation.
[  465.088631] CIFS VFS: cifs_mount failed w/return code = -115
(mount.c:72): Messages from underlying mount program:
(mount.c:76): mount error(115): Operation now in progress
(mount.c:76): Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
(pam_mount.c:522): mount of share1 failed
[  475.110298] CIFS VFS: Error connecting to socket. Aborting operation.
[  475.110660] CIFS VFS: cifs_mount failed w/return code = -115
(mount.c:72): Messages from underlying mount program:
(mount.c:76): mount error(115): Operation now in progress
(mount.c:76): Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
(pam_mount.c:522): mount of share2 failed
[...]

Judging by the timestamps, there is exactly 10 seconds timeout for each mount.

The mount.cifs man page shows that the CIFS mount timeout is not configurable (contrary to e.g. NFS, see this post).

I could not find anything about setting timeouts at the pam_mount level either.

Is it possible to perform the mounts in the background without blocking the login process ? Or to shorten CIFS mount timeouts or set a global pam_mount timeout ?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images