Problem
The login of a user profile on a Windows server / terminal server takes 2-3 minutes, resulting in an unusually long login time. What is striking about this bug is that it occurs after updating Samba to version 4.18.3.
Root Cause Bug 57076
log.smbd around that time (08:14:39) shows error message of this kind:
===
[2024/02/20 08:14:17.720475, 0, pid=32501] ../../source3/smbd/smb2_server.c:685(smb2_validate_sequence_number)
smb2_validate_sequence_number: smb2_validate_sequence_number: bad message_id 2 (sequence id 2) (granted = 1, low = 1, range = 1)
[2024/02/20 08:14:18.238613, 0, pid=32525] ../../source3/smbd/smb2_server.c:685(smb2_validate_sequence_number)
smb2_validate_sequence_number: smb2_validate_sequence_number: bad message_id 2 (sequence id 2) (granted = 1, low = 1, range = 1)
[2024/02/20 08:14:39.749050, 0, pid=32554] ../../source3/smbd/smb2_server.c:685(smb2_validate_sequence_number)
smb2_validate_sequence_number: smb2_validate_sequence_number: bad message_id 2 (sequence id 2) (granted = 1, low = 1, range = 1)
[2024/02/20 08:17:09.884848, 0, pid=937] ../../source3/smbd/smb2_server.c:685(smb2_validate_sequence_number)
smb2_validate_sequence_number: smb2_validate_sequence_number: bad message_id 2 (sequence id 2) (granted = 1, low = 1, range = 1)
===
Environment
UCS 5.0-x
Samba 4.18.3
Workaround
Workaround according to upstream Bug report:
1. echo -e "## Workaround for UCS [Bug #57076](https://forge.univention.org/bugzilla/show_bug.cgi?id=57076)\n[global]\n\tserver multi channel support = no\n" >> /etc/samba/local.conf
2. ucr commit /etc/samba/smb.conf
3. /etc/init.d/samba restart