[2024/04/06 15:38:37.844255, 1] ../../source3/smbd/session.c:69(session_claim)
pam_session rejected the session for tmachine [smb/689779730]
The logs are pretty clear that it’s caused by PAM. Since you have a home share we have to set obey pam restrictions = true in order to have the feature in which we auto-create home directories via pam_mkhomedir. Having a session rejection means that the user in question is misconfigured for this purpose (missing home directory, having invalid shell, etc).
Home Directory: /nonexistent
Shell: /usr/bin/bash Email:xxxxxxx@gmail.com
Password Disabled: No
Lock User: No
Samba Authentication: Yes
SSH: Password login enabled
User has a shell, and account is enabled, so I’m assuming that “/nonexistent” is no longer valid.
Odd as I have other accounts with this setting that I can log in with…
Nevertheless I’ll try to set a real home directory tomorrow and see if that works.
/var/empty is the new default for home directories. This was partially to ameliorate issues with libpam session management, and prevent cases in past versions where users could accidentally (or intentionally) create a /nonexistent directory.
Strangely, my admin account has “/nonexistent” and it has no problem logging into my Truenas server. I assume its only when you are using the ID for SMB access that its an issue.
You may also want to update the documentation here to the new default for for no directory.