A
A
Alexander Semenenko2018-04-26 13:42:13
linux
Alexander Semenenko, 2018-04-26 13:42:13

Why mount cifs can create multiple mounts in 1 mount point, how to get rid of it?

Debian has this problem. Let's say I write the mount string cifs balls in /etc/fstab.
Next, I run mount -a, everything is mounted.
I run mount -a again.
After that, I look at my mounts with the mount command:
//Server/xxx on /home/xxx/xxx type cifs
//Server/xxx on /home/xxx/xxx type cifs
I see 2 absolutely identical mounts.
Found an article .
But this is how we use not fstab, but pam_mount, with several user logins on the server, many such mounts are formed that look exactly the same in mtab. Has anyone solved a similar problem?
I tried to solve the issue using pam, I think that pam_tally.so will count inputs, and if this is not the first input, it will skip pam_mount, but maybe I made a mistake in the syntax:

spoiler
auth optional [success=1 default=ignore] pam_tally.so deny=1 onerr=succeed no_lock_time no_reset
auth optional pam_mount.so

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2018-04-26
@saboteur_kiev

Mount does not prevent anything from being mounted on top of the mounted one.
Access will be to what was mounted last.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question