rdesktop / rdesktop

🚨 rdesktop is in need of a new maintainter. Please see the home page for more details. 🚨
http://www.rdesktop.org
GNU General Public License v3.0
1.27k stars 364 forks source link

Logout after welcome #358

Open mimi89999 opened 4 years ago

mimi89999 commented 4 years ago

Hello, When I try to connect to my Windows 7 pro VM, I see the standard welcome loading, but after several seconds the message changes to logging out without me initiating a logout that makes it impossible to login to the remote host.

is_wm_active(): WM name: Mutt
Connecting to server using NLA...
Core(warning): Certificate received from server is NOT trusted by this system, an exception has been added by the user to trust this specific certificate.
TLS  Session info: (TLS1.2)-(ECDHE-SECP256R1)-(RSA-SHA1)-(AES-256-CBC)-(SHA1)

Failed to initialize NLA, do you have correct Kerberos TGT initialized ?
Failed to connect using NLA, trying with SSL
Core(warning): Certificate received from server is NOT trusted by this system, an exception has been added by the user to trust this specific certificate.
TLS  Session info: (TLS1.2)-(ECDHE-SECP256R1)-(RSA-SHA1)-(AES-256-CBC)-(SHA1)

Connection established using SSL.
Connection successful
Protocol(warning): process_pdu_logon(), Unhandled login infotype 1
Clipboard(error): xclip_handle_SelectionNotify(), unable to find a textual target to satisfy RDP clipboard text request
Window resize detected, reconnecting to new size 1280x740
Disconnecting...
Resize reconnect loop triggered, new size 1280x740
Connecting to server using NLA...
Core(warning): Certificate received from server is NOT trusted by this system, an exception has been added by the user to trust this specific certificate.
TLS  Session info: (TLS1.2)-(ECDHE-SECP256R1)-(RSA-SHA1)-(AES-256-CBC)-(SHA1)

Failed to initialize NLA, do you have correct Kerberos TGT initialized ?
Failed to connect using NLA, trying with SSL
Core(warning): Certificate received from server is NOT trusted by this system, an exception has been added by the user to trust this specific certificate.
TLS  Session info: (TLS1.2)-(ECDHE-SECP256R1)-(RSA-SHA1)-(AES-256-CBC)-(SHA1)

Connection established using SSL.
Connection successful
Protocol(warning): process_pdu_logon(), Unhandled login infotype 1
Disconnecting...
disconnect: Logout initiated by user.

The warning Protocol(warning): process_pdu_logon(), Unhandled login infotype 1 appears at the same time when the message changes.

Version: 1.9.0-1+b1 from Debian repo

opoplawski commented 4 years ago

We may be seeing the same with a Windows 10 VM:

$ rdesktop -r sound -r clipboard -r scard -i -o sc-csp-name="Microsoft Base Smart Card Crypto Provider" -u USER HOST -f -p - 
Autoselecting keyboard map 'en-us' from locale
Smart card PIN:  
Core(warning): Certificate received from server is NOT trusted by this system, an
exception has been added by the user to trust this specific certificate.
Connection established using CredSSP.
Protocol(warning): process_pdu_logon(), Unhandled login infotype 1
Core(error): tcp_recv(), recv() failed: Connection reset by peer
Core(warning): Certificate received from server is NOT trusted by this system, an
exception has been added by the user to trust this specific certificate.
Connection established using CredSSP.
Protocol(warning): process_pdu_logon(), Unhandled login infotype 1
Clipboard(error): xclip_handle_SelectionNotify(), unable to find a textual target
to satisfy RDP clipboard text request
disconnect: Logout initiated by user.

With 1.9.0 as well. Remote system reports some errors as well:

Microsoft-Windows-RemoteDesktopServices-RdpCoreTS  NETWORK SERVICE Well Known Group        Warning HOST RemoteFX module         The RDP protocol component MCS detected an error (0) in the protocol stream and the client was disconnected.
Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational      102836  Thu Dec 12 10:09:07 2019        226     Microsoft-Windows-RemoteDesktopServices-RdpCoreTS  NETWORK SERVICE Well Known Group        Warning HOST RemoteFX module         RDP_SEC: An error was encountered when transitioning from FStatePassthrough in response to FEventCheckAndCompleteReadsFailed (error code 0x8007139F).
Microsoft-Windows-RemoteDesktopServices-RdpCoreTS  NETWORK SERVICE Well Known Group        Warning HOST RemoteFX module         The RDP protocol component X.224 detected an error (0) in the protocol stream and the client was disconnected. 
Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational      102845  Thu Dec 12 10:09:07 2019        227     Microsoft-Windows-RemoteDesktopServices-RdpCoreTS  NETWORK SERVICE Well Known Group        Error   HOST RemoteFX module         'Failed to get property Disconnect Reason' in CUMRDPConnection::GetDisconnectReason at 4959 err=[0x80070057]
opoplawski commented 4 years ago

I'll note that successful connections result in the 'Protocol(warning): process_pdu_logon(), Unhandled login infotype 1' message, so I don't think that is related.

CendioOssman commented 4 years ago

It seems odd that rdesktop would cause something if you've gotten that far. Does this happen with FreeRDP or Microsoft's RDP client?

mimi89999 commented 4 years ago

Actually, I never had this issue in Vinagre

CendioOssman commented 4 years ago

Vinagre uses FreeRDP, so that would indicate that rdesktop is provoking this somehow. Thanks.

JoshDreamland commented 1 year ago

In case this information ever helps anyone, I don't experience this issue with rdesktop, but I see similar behavior with OpenSSH when Windows attempts to authenticate my AD account over a proxy network that isn't yet connected. The local system will authenticate me but then the AD will fail to authorize the login because I have no intranet access. I had a different issue (with better log messages) trying to use rdesktop with an AD account before creating a local user by the same name.