Hah, thanks for your instructions they yielded results. For each of
these tests I did the following.

* Reconfigured `pam-auth-update`
* I set `obey pam restrictions = Yes`
* Rebooted
* Checked whether the issue was reproducible
   * service restart smbd
   * check whether $HOME was still mounted
* Repeat

===============================================
Settings in pam-auth-update

[*] Unix authentication
[ ] Register user sessions in the systemd control group hierarchy
[ ] Create home directory on login
[ ] eCryptfs Key/Mount Management
[ ] Inheritable Capabilities Management

Restarted smbd and observed the log entry:

# tail -F /var/log/auth.log|rg samba:session
Sep 12 22:15:08 machine smbd[1839]: pam_unix(samba:session): session closed for 
user johndoe

$HOME was still available.

===============================================
Settings in pam-auth-update

[*] Unix authentication
[ ] Register user sessions in the systemd control group hierarchy
[ ] Create home directory on login
[ ] eCryptfs Key/Mount Management
[*] Inheritable Capabilities Management

Restarted smbd and observed the log entry:

# tail -F /var/log/auth.log|rg samba:session
Sep 12 22:24:27 machine smbd[1844]: pam_unix(samba:session): session closed for 
user johndoe

$HOME was still available.

===============================================
Settings in pam-auth-update

[*] Unix authentication
[ ] Register user sessions in the systemd control group hierarchy
[ ] Create home directory on login
[*] eCryptfs Key/Mount Management
[*] Inheritable Capabilities Management

Restarted smbd and observed the log entry:

# tail -F /var/log/auth.log|rg samba:session
Sep 12 22:27:31 machine smbd[1861]: pam_unix(samba:session): session closed for 
user johndoe

$HOME was unmounted!!!

===============================================
Settings in pam-auth-update

[*] Unix authentication
[ ] Register user sessions in the systemd control group hierarchy
[ ] Create home directory on login
[*] eCryptfs Key/Mount Management
[*] Inheritable Capabilities Management

Restarted smbd and observed the log entry:

# tail -F /var/log/auth.log|rg samba:session
Sep 12 22:32:57 machine smbd[1857]: pam_unix(samba:session): session closed for 
user johndoe

$HOME was unmounted!!!

===============================================

So, to summarize: the setting "eCryptfs Key/Mount Management" from pam-
auth-update is what causes the behavior. So I guess this isn't related
to Samba, but I would still consider this defective behavior
nevertheless.

But honestly even if you close this and never did anything about it it
would still help someone encountering this in future because of the
search results.

** Changed in: samba (Ubuntu)
       Status: Incomplete => New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1894899

Title:
  smbd with "obey pam restrictions" enabled unmounts my interactive
  users' ecryptfs home directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1894899/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to