Page 1 of 1

Samba - Rejecting connection request

Posted: 04 Nov 2022, 16:12
by OttoG
Hoping that the community can help. I've tried to resolve this via Terramaster support (unsuccessfully). The last communication with support was "hi, our engineers are in the meeting currently, will e-mail you the feedback as soon as we have. Thanks for your patience in advance." That was on Oct 12 and.... Nothing since.

Device = F5-221
Version = 5.0.176-00227
Samba version = 4.15.6

The problem
When trying to map network drive From any device e.g.: Windows PC, Android Phone, the connection fails due to Samba rejecting the user credentials.
The user is an admin user on the NAS and is the one that I use to successfully log into it via the web browser and connect to it for FTP or SSH access.
Apart from being unable to Samba rejecting connection credentials, the NAS is functioning correctly.

Things I have tried:
1. Restart the NAS - no change
2. Restart Samba - no change
3. Reinitialised Samba (support suggestion) using script
"cp -rf /etc.default/samba/* /etc/samba
rm /etc/tos/config/smb.json
/etc/init.d/samba restart"

Didn't help.

4. Compared the Samba config files between the offending NAS and my Back-up NAS (Note: samba fine on the back-up NAS)
I don't see any any differences and the relevant user is registered in the smbp file.
5. I've also checked that my router isn't blocking the connection requests.

Below are the most recent lines in the log.smbd file that confirms that samba is rejecting the connection request.
----------------------
[2022/10/31 00:09:20.945247, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session close failed : Authentication failure
[2022/11/04 18:06:02.357426, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session setup failed : Authentication failure
[2022/11/04 18:06:02.368352, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session close failed : Authentication failure
[2022/11/04 18:15:38.907970, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session setup failed : Authentication failure
[2022/11/04 18:15:38.918631, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session close failed : Authentication failure
----------------------

I'm at a loss as to what to try next/check next. Any help from the community would be much appreciated.

Re: Samba - Rejecting connection request

Posted: 04 Nov 2022, 17:44
by TMSupport
Please try to modify the IP of TNAS and reconnect.

Re: Samba - Rejecting connection request

Posted: 06 Nov 2022, 06:45
by OttoG
No Change - Samba still rejecting connections

Samba Log extract:
[2022/11/06 09:24:17.915917, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session setup failed : Authentication failure
[2022/11/06 09:24:17.928355, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session close failed : Authentication failure
[2022/11/06 09:24:17.984924, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session setup failed : Authentication failure
[2022/11/06 09:24:17.995789, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session close failed : Authentication failure
[2022/11/06 09:24:33.359391, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session setup failed : Authentication failure
[2022/11/06 09:24:33.370203, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session close failed : Authentication failure
[2022/11/06 09:26:11.158280, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session setup failed : Authentication failure
[2022/11/06 09:26:11.171638, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session close failed : Authentication failure
[2022/11/06 09:29:46.407487, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session setup failed : Authentication failure
[2022/11/06 09:29:46.417929, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session close failed : Authentication failure
[2022/11/06 09:30:25.676303, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session setup failed : Authentication failure
[2022/11/06 09:30:25.687169, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session close failed : Authentication failure
[2022/11/06 09:30:42.610155, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session setup failed : Authentication failure
[2022/11/06 09:30:42.620751, 0] ../../source3/auth/pampass.c:90(smb_pam_error_handler)
smb_pam_error_handler: PAM: session close failed : Authentication failure
The attached images are error messages on both my w11 PC and Samsung Mobile. (Note both devices happily establish samba connections to my back-up NAS.

Re: Samba - Rejecting connection request

Posted: 06 Nov 2022, 07:01
by OttoG
Here is an extract from the Log Centre App on the NAS

Re: Samba - Rejecting connection request

Posted: 06 Nov 2022, 13:46
by TMroy
{L_BUTTON_AT}OttoG

The PAM auth has been implemented in TOS 5, PAM auth applied for many services in TOS 5, including samba. From the samba log, it seems the samba auth request was rejected by the PAM auth. This could happen if you input more than 3 three times the wrong credentials. We need to check the PAM log so that we can know what really happened there.

Re: Samba - Rejecting connection request

Posted: 06 Nov 2022, 16:19
by OttoG
Ok, what is the path to the PAM log and the PAM log file name?

Re: Samba - Rejecting connection request

Posted: 08 Nov 2022, 16:49
by OttoG
How can I give you access to the PAM log or upload a copy if you cease responding?

Re: Samba - Rejecting connection request

Posted: 08 Nov 2022, 19:13
by TMSupport
Please contact our tech team to check remotely.