Closed MEA707 closed 4 years ago
You should also share xrdp-sesman.log
.
Here you go, only the last two lines correspond to the above xrdp log session I posted (based on the time stamp). Thanks for your help.
[20200408-19:32:42] [DEBUG] libscp initialized [20200408-19:32:42] [DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350. [20200408-19:32:42] [INFO ] starting xrdp-sesman with pid 7974 [20200408-19:32:42] [DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350) [20200408-19:32:42] [INFO ] listening to port 3350 on 127.0.0.1 [20200408-19:33:14] [INFO ] shutting down sesman 1 [20200408-19:33:14] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350) [20200408-19:34:11] [DEBUG] libscp initialized [20200408-19:34:11] [DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350. [20200408-19:34:11] [INFO ] starting xrdp-sesman with pid 1191 [20200408-19:34:12] [INFO ] listening to port 3350 on 127.0.0.1 [20200408-19:34:11] [DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350) [20200408-19:45:28] [INFO ] A connection received from ::1 port 47936 [20200408-19:45:30] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-19:46:56] [INFO ] A connection received from ::1 port 47938 [20200408-19:46:59] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-19:49:17] [INFO ] A connection received from ::1 port 47948 [20200408-19:49:19] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-19:51:19] [INFO ] A connection received from ::1 port 47950 [20200408-19:51:22] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-19:52:52] [INFO ] A connection received from ::1 port 47952 [20200408-19:52:54] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-19:53:11] [INFO ] A connection received from ::1 port 47954 [20200408-19:53:14] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-19:53:26] [INFO ] A connection received from ::1 port 47956 [20200408-19:53:29] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:08:23] [INFO ] A connection received from ::1 port 47964 [20200408-20:08:26] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:08:50] [INFO ] A connection received from ::1 port 47966 [20200408-20:08:51] [INFO ] ++ created session (access granted): username mea707, ip ::ffff:192.168.1.6:49861 - socket: 12 [20200408-20:08:51] [INFO ] starting Xorg session... [20200408-20:08:51] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910) [20200408-20:08:51] [DEBUG] Closed socket 9 (AF_INET6 :: port 6010) [20200408-20:08:51] [DEBUG] Closed socket 9 (AF_INET6 :: port 6210) [20200408-20:08:51] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:08:51] [INFO ] calling auth_start_session from pid 6558 [20200408-20:08:51] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350) [20200408-20:08:51] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:08:51] [INFO ] /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20200408-20:08:52] [CORE ] waiting for window manager (pid 6559) to exit [20200408-20:08:54] [CORE ] window manager (pid 6559) did exit, cleaning up session [20200408-20:08:54] [INFO ] calling auth_stop_session and auth_end from pid 6558 [20200408-20:08:54] [DEBUG] cleanup_sockets: [20200408-20:08:55] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_10 [20200408-20:08:55] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdp_chansrv_audio_in_socket_10 [20200408-20:08:55] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdpapi_10 [20200408-20:08:55] [INFO ] ++ terminated session: username mea707, display :10.0, session_pid 6558, ip ::ffff:192.168.1.6:49861 - socket: 12 [20200408-20:09:22] [INFO ] A connection received from ::1 port 47972 [20200408-20:09:25] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:09:54] [INFO ] A connection received from ::1 port 47974 [20200408-20:09:57] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:10:50] [INFO ] A connection received from ::1 port 47976 [20200408-20:10:52] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:11:19] [INFO ] A connection received from ::1 port 47978 [20200408-20:11:22] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:21:37] [INFO ] A connection received from ::1 port 48176 [20200408-20:21:41] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:22:01] [INFO ] A connection received from ::1 port 48178 [20200408-20:22:05] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:32:34] [INFO ] shutting down sesman 1 [20200408-20:32:34] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350) [20200408-20:32:43] [DEBUG] libscp initialized [20200408-20:32:43] [DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350. [20200408-20:32:43] [INFO ] starting xrdp-sesman with pid 8836 [20200408-20:32:43] [DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350) [20200408-20:32:43] [INFO ] listening to port 3350 on 127.0.0.1 [20200408-20:34:32] [INFO ] A connection received from ::1 port 48464 [20200408-20:34:35] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200408-20:51:59] [INFO ] shutting down sesman 1 [20200408-20:52:00] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350) [20200408-20:53:00] [DEBUG] libscp initialized [20200408-20:53:01] [DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350. [20200408-20:53:01] [DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350) [20200408-20:53:01] [INFO ] starting xrdp-sesman with pid 1133 [20200408-20:53:02] [INFO ] listening to port 3350 on 127.0.0.1 [20200408-21:27:55] [INFO ] A connection received from ::1 port 47664 [20200408-21:27:59] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
Hi @MEA707 ,
The bit before the last two lines is interesting, as it shows a user session that authenticates, but terminates almost immediately. The user name in this case is mea707
.
Your initial post shows the username MEA707
not authenticating.
Unlike Windows, Linux usernames are case-sensitive. I suspect the configured user on your system is mea707
. Is this correct?
If so, please try logging in as mea707
rather than MEA707
, and reporting back what happens.
In general on Linux it is a good idea to stick to lower-case usernames. Although it doesn't matter much on a single-user system, you will have interesting problems if you're using LDAP for authentication and other purposes.
Hi @matt335672,
You are correct that initially I did try to log in as uppercase MEA707 mistakenly. I then tried logging in as lowercase mea707 and still got the same error.
The lines I posted are from my attempt to login as lowercase mea707 which is what the username on the OS is configured as.
Thanks for your help!
Hi @MEA707,
I'm afraid I'm failing to get a clear picture of what is going on here. Knowing where your PPA has come from would also be useful.
Can you do the following:-
xrdp
and xrdp-sesman
services/var/log/xrdp.log
and /var/log/xrdp-sesman.log
being careful not to disturb the permissions on them.These commands should do that:-
sudo systemctl stop xrdp xrdp-sesman
sudo tee /var/log/xrdp.log /var/log/xrdp-sesman.log </dev/null
sudo systemctl start xrdp xrdp-sesman
Then try to log in to the system using the Xorg backend and mea707
Then:-
sudo systemctl stop xrdp xrdp-sesman
Finally, post the log files /var/log/xrdp.log
and /var/log/xrdp-sesman.log
, plus where you got the PPA from, and any other useful information.
Thanks.
Hi @matt335672,
I did not add a specific PPA to download XRDP. It installed from the base Ubuntu repository that comes with Linux Mint. This is the address:
http://archive.ubuntu.com/ubuntu bionic/universe amd64
I followed your exact instructions and here's the full log:
xrdp.log:
[20200411-10:26:03] [DEBUG] Testing if xrdp can listen on 0.0.0.0 port 3389. [20200411-10:26:03] [DEBUG] Closed socket 7 (AF_INET6 :: port 3389) [20200411-10:26:05] [INFO ] starting xrdp with pid 1670 [20200411-10:26:05] [INFO ] listening to port 3389 on 0.0.0.0 [20200411-10:26:47] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.6 port 57303 [20200411-10:26:47] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389) [20200411-10:26:47] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389) [20200411-10:26:47] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem [20200411-10:26:47] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem [20200411-10:26:47] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied [20200411-10:26:47] [DEBUG] TLSv1.2 enabled [20200411-10:26:47] [DEBUG] TLSv1.1 enabled [20200411-10:26:47] [DEBUG] TLSv1 enabled [20200411-10:26:47] [DEBUG] Security layer: requested 11, selected 0 [20200411-10:26:47] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389) [20200411-10:26:49] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.6 port 57304 [20200411-10:26:49] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389) [20200411-10:26:49] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389) [20200411-10:26:49] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem [20200411-10:26:49] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem [20200411-10:26:49] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied [20200411-10:26:49] [DEBUG] TLSv1.2 enabled [20200411-10:26:49] [DEBUG] TLSv1.1 enabled [20200411-10:26:49] [DEBUG] TLSv1 enabled [20200411-10:26:49] [DEBUG] Security layer: requested 0, selected 0 [20200411-10:26:49] [INFO ] connected client computer name: MEA707-THINKPAD [20200411-10:26:49] [INFO ] Non-TLS connection established from ::ffff:192.168.1.6 port 57304: encrypted with standard RDP security [20200411-10:26:49] [DEBUG] xrdp_0000070a_wm_login_mode_event_00000001 [20200411-10:26:49] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini [20200411-10:26:50] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file [20200411-10:27:06] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350 [20200411-10:27:07] [INFO ] xrdp_wm_log_msg: sesman connect ok [20200411-10:27:07] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait... [20200411-10:27:07] [DEBUG] return value from xrdp_mm_connect 0 [20200411-10:27:09] [INFO ] xrdp_wm_log_msg: login failed for display 0 [20200411-10:27:09] [DEBUG] xrdp_mm_module_cleanup [20200411-10:27:09] [DEBUG] Closed socket 16 (AF_INET6 ::1 port 49208) [20200411-10:27:17] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389) [20200411-10:27:17] [DEBUG] xrdp_mm_module_cleanup [20200411-10:28:16] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
xrdp-sesman.log:
[20200411-10:26:03] [DEBUG] libscp initialized [20200411-10:26:03] [DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350. [20200411-10:26:03] [INFO ] starting xrdp-sesman with pid 1660 [20200411-10:26:03] [INFO ] listening to port 3350 on 127.0.0.1 [20200411-10:26:03] [DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350) [20200411-10:27:06] [INFO ] A connection received from ::1 port 49208 [20200411-10:27:09] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20200411-10:28:16] [INFO ] shutting down sesman 1 [20200411-10:28:16] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
This login was attempted while I was logged out of the Linux computer, I am not sure how remote logins work if the PC is already logged in, does it make a difference in Linux? For the record, in the past I tried both remoting in while the Linux PC was logged in already and logged out, and in both cases I got the same message in XRDP.
Looking in Synaptics Package Manager, I see there is another xorgxrdp I could install, do you know anything about it?
Thanks again.
Thanks for that.
Something odd seems to be happening in sesman, in that it is trying to log you in to display 0, rather than 10 or 11.
The file /etc/xrdp/sesman.ini
should contain this setting in the '[Sessions]' section:-
;; X11DisplayOffset - x11 display number offset
; Type: integer
; Default: 10
X11DisplayOffset=10
Having this set to '0' could cause sesman to try to create a session on display 0. This won't work, as this will conflict with the local display.
If it's not that, you could also use the command journalctl -u xrdp-sesman
to get some more debugging output from sesman. You would need to be careful with log times if you do this, as the generated output may go back for some time.
The XRDP session will be entirely separate from the console session. You should be able to use both independently.
A couple of other points:-
sudo adduser xrdp ssl-cert
and restart the XRDP service. This isn't however relevant to your existing issue, so I'd recommend leaving that for a bit.@matt335672
I checked the Sessions under sesman.ini and it shows default as 10, exactly like what you showed.
Here is the debugging output for the past 2 days:
Apr 10 08:06:43 MEA707-ThinkPad-T61 xrdp-sesman[1133]: (1133)(140341273863488)[INFO ] A connection received from ::1 port 48376 Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Got "debug" argument. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Pam_sm_authenticate was called with flags 0x0 (UNKNOWN). Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Got no PAM_RHOST. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Got no SSH_CONNECTION. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have no PAM_AUTHTOK. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: PAM_SERVICE: xrdp-sesman. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have PAM_TTY: xrdp-sesman. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have no DISPLAY from PAM_TTY. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have now XDisplay: "(null)" and XAuth: "(null)". Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have no PAM username. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Parent PID: 1133. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Child (helper) PID: 20719. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Wrote random string to fifo. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Prompting username returned PAM_SUCCESS. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have username: mea707. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: running not OPENPAM. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Prompting password returned PAM_SUCCESS. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Prompting returned within less then 1 second. Waiting 1 sec for helper start. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Got password from helper via pipe. Apr 10 08:06:44 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Return 25 (PAM_IGNORE). Apr 10 08:06:44 MEA707-ThinkPad-T61 xrdp-sesman[1133]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp-sesman ruser= rhost= user=mea707 Apr 10 08:06:46 MEA707-ThinkPad-T61 xrdp-sesman[1133]: (1133)(140341273863488)[DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) Apr 10 08:07:38 MEA707-ThinkPad-T61 xrdp-sesman[1133]: (1133)(140341273863488)[INFO ] A connection received from ::1 port 48378 Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Got "debug" argument. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Pam_sm_authenticate was called with flags 0x0 (UNKNOWN). Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Got no PAM_RHOST. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Got no SSH_CONNECTION. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have no PAM_AUTHTOK. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: PAM_SERVICE: xrdp-sesman. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have PAM_TTY: xrdp-sesman. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have no DISPLAY from PAM_TTY. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have now XDisplay: "(null)" and XAuth: "(null)". Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have no PAM username. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Parent PID: 1133. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Child (helper) PID: 20759. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Wrote random string to fifo. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Prompting username returned PAM_SUCCESS. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Have username: mea707. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: running not OPENPAM. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Prompting password returned PAM_SUCCESS. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Prompting returned within less then 1 second. Waiting 1 sec for helper start. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Got password from helper via pipe. Apr 10 08:07:38 MEA707-ThinkPad-T61 pam_fingerprint-gui[1133]: Return 25 (PAM_IGNORE). Apr 10 08:07:38 MEA707-ThinkPad-T61 xrdp-sesman[1133]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp-sesman ruser= rhost= user=mea707 Apr 10 08:07:41 MEA707-ThinkPad-T61 xrdp-sesman[1133]: (1133)(140341273863488)[DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) Apr 10 08:16:36 MEA707-ThinkPad-T61 systemd[1]: Stopping xrdp session manager... Apr 10 08:16:36 MEA707-ThinkPad-T61 systemd[1]: xrdp-sesman.service: Control process exited, code=exited status=1 Apr 10 08:16:36 MEA707-ThinkPad-T61 xrdp-sesman[1133]: (1133)(140341273863488)[INFO ] shutting down sesman 1 Apr 10 08:16:36 MEA707-ThinkPad-T61 xrdp-sesman[1133]: (1133)(140341273863488)[DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350) Apr 10 08:16:36 MEA707-ThinkPad-T61 systemd[1]: xrdp-sesman.service: Failed with result 'exit-code'. Apr 10 08:16:36 MEA707-ThinkPad-T61 systemd[1]: Stopped xrdp session manager. Apr 11 09:57:09 MEA707-ThinkPad-T61 systemd[1]: Starting xrdp session manager... Apr 11 09:57:09 MEA707-ThinkPad-T61 xrdp-sesman[28178]: (28178)(140472035480896)[DEBUG] libscp initialized Apr 11 09:57:09 MEA707-ThinkPad-T61 xrdp-sesman[28178]: (28178)(140472035480896)[DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350. Apr 11 09:57:09 MEA707-ThinkPad-T61 xrdp-sesman[28179]: (28179)(140472035480896)[INFO ] starting xrdp-sesman with pid 28179 Apr 11 09:57:09 MEA707-ThinkPad-T61 xrdp-sesman[28178]: (28178)(140472035480896)[DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350) Apr 11 09:57:09 MEA707-ThinkPad-T61 xrdp-sesman[28179]: (28179)(140472035480896)[INFO ] listening to port 3350 on 127.0.0.1 Apr 11 09:57:09 MEA707-ThinkPad-T61 systemd[1]: Started xrdp session manager. Apr 11 10:06:09 MEA707-ThinkPad-T61 xrdp-sesman[28179]: (28179)(140472035480896)[INFO ] A connection received from ::1 port 48846 Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Got "debug" argument. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Pam_sm_authenticate was called with flags 0x0 (UNKNOWN). Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Got no PAM_RHOST. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Got no SSH_CONNECTION. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Have no PAM_AUTHTOK. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: PAM_SERVICE: xrdp-sesman. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Have PAM_TTY: xrdp-sesman. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Have no DISPLAY from PAM_TTY. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Have now XDisplay: "(null)" and XAuth: "(null)". Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Have no PAM username. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Parent PID: 28179. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Child (helper) PID: 29788. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Wrote random string to fifo. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Prompting username returned PAM_SUCCESS. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Have username: mea707. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: running not OPENPAM. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Prompting password returned PAM_SUCCESS. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Prompting returned within less then 1 second. Waiting 1 sec for helper start. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Got password from helper via pipe. Apr 11 10:06:10 MEA707-ThinkPad-T61 pam_fingerprint-gui[28179]: Return 25 (PAM_IGNORE). Apr 11 10:06:10 MEA707-ThinkPad-T61 xrdp-sesman[28179]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp-sesman ruser= rhost= user=mea707 Apr 11 10:06:12 MEA707-ThinkPad-T61 xrdp-sesman[28179]: (28179)(140472035480896)[DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) Apr 11 10:09:34 MEA707-ThinkPad-T61 systemd[1]: Stopping xrdp session manager... Apr 11 10:09:35 MEA707-ThinkPad-T61 xrdp-sesman[28179]: (28179)(140472035480896)[INFO ] shutting down sesman 1 Apr 11 10:09:35 MEA707-ThinkPad-T61 systemd[1]: xrdp-sesman.service: Control process exited, code=exited status=1 Apr 11 10:09:35 MEA707-ThinkPad-T61 xrdp-sesman[28179]: (28179)(140472035480896)[DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350) Apr 11 10:09:35 MEA707-ThinkPad-T61 systemd[1]: xrdp-sesman.service: Failed with result 'exit-code'. Apr 11 10:09:35 MEA707-ThinkPad-T61 systemd[1]: Stopped xrdp session manager. Apr 11 10:10:29 MEA707-ThinkPad-T61 systemd[1]: Starting xrdp session manager... Apr 11 10:10:29 MEA707-ThinkPad-T61 xrdp-sesman[31031]: (31031)(140628815394112)[DEBUG] libscp initialized Apr 11 10:10:30 MEA707-ThinkPad-T61 xrdp-sesman[31031]: (31031)(140628815394112)[DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350. Apr 11 10:10:30 MEA707-ThinkPad-T61 xrdp-sesman[31032]: (31032)(140628815394112)[INFO ] starting xrdp-sesman with pid 31032 Apr 11 10:10:30 MEA707-ThinkPad-T61 xrdp-sesman[31031]: (31031)(140628815394112)[DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350) Apr 11 10:10:30 MEA707-ThinkPad-T61 xrdp-sesman[31032]: (31032)(140628815394112)[INFO ] listening to port 3350 on 127.0.0.1 Apr 11 10:10:30 MEA707-ThinkPad-T61 systemd[1]: Started xrdp session manager. -- Reboot -- Apr 11 13:58:18 MEA707-ThinkPad-T61 systemd[1]: Starting xrdp session manager... Apr 11 13:58:19 MEA707-ThinkPad-T61 xrdp-sesman[1103]: (1103)(139776034805056)[DEBUG] libscp initialized Apr 11 13:58:20 MEA707-ThinkPad-T61 xrdp-sesman[1103]: (1103)(139776034805056)[DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350. Apr 11 13:58:20 MEA707-ThinkPad-T61 xrdp-sesman[1116]: (1116)(139776034805056)[INFO ] starting xrdp-sesman with pid 1116 Apr 11 13:58:20 MEA707-ThinkPad-T61 xrdp-sesman[1103]: (1103)(139776034805056)[DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350) Apr 11 13:58:20 MEA707-ThinkPad-T61 xrdp-sesman[1116]: (1116)(139776034805056)[INFO ] listening to port 3350 on 127.0.0.1 Apr 11 13:58:21 MEA707-ThinkPad-T61 systemd[1]: Started xrdp session manager. Apr 11 14:10:13 MEA707-ThinkPad-T61 systemd[1]: Stopping xrdp session manager... Apr 11 14:10:13 MEA707-ThinkPad-T61 systemd[1]: xrdp-sesman.service: Control process exited, code=exited status=1 Apr 11 14:10:13 MEA707-ThinkPad-T61 xrdp-sesman[1116]: (1116)(139776034805056)[INFO ] shutting down sesman 1 Apr 11 14:10:13 MEA707-ThinkPad-T61 xrdp-sesman[1116]: (1116)(139776034805056)[DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350) Apr 11 14:10:13 MEA707-ThinkPad-T61 systemd[1]: xrdp-sesman.service: Failed with result 'exit-code'. Apr 11 14:10:13 MEA707-ThinkPad-T61 systemd[1]: Stopped xrdp session manager. Apr 12 11:13:28 MEA707-ThinkPad-T61 systemd[1]: Starting xrdp session manager... Apr 12 11:13:28 MEA707-ThinkPad-T61 xrdp-sesman[9914]: (9914)(140181926028608)[DEBUG] libscp initialized Apr 12 11:13:28 MEA707-ThinkPad-T61 xrdp-sesman[9914]: (9914)(140181926028608)[DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350. Apr 12 11:13:28 MEA707-ThinkPad-T61 xrdp-sesman[9915]: (9915)(140181926028608)[INFO ] starting xrdp-sesman with pid 9915 Apr 12 11:13:28 MEA707-ThinkPad-T61 xrdp-sesman[9914]: (9914)(140181926028608)[DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350) Apr 12 11:13:28 MEA707-ThinkPad-T61 xrdp-sesman[9915]: (9915)(140181926028608)[INFO ] listening to port 3350 on 127.0.0.1 Apr 12 11:13:28 MEA707-ThinkPad-T61 systemd[1]: Started xrdp session manager. Apr 12 11:17:02 MEA707-ThinkPad-T61 xrdp-sesman[9915]: (9915)(140181926028608)[INFO ] A connection received from ::1 port 51866 Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Got "debug" argument. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Pam_sm_authenticate was called with flags 0x0 (UNKNOWN). Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Got no PAM_RHOST. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Got no SSH_CONNECTION. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Have no PAM_AUTHTOK. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: PAM_SERVICE: xrdp-sesman. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Have PAM_TTY: xrdp-sesman. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Have no DISPLAY from PAM_TTY. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Have now XDisplay: "(null)" and XAuth: "(null)". Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Have no PAM username. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Parent PID: 9915. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Child (helper) PID: 11072. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Wrote random string to fifo. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Prompting username returned PAM_SUCCESS. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Have username: mea707. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: running not OPENPAM. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Prompting password returned PAM_SUCCESS. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Prompting returned within less then 1 second. Waiting 1 sec for helper start. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Got password from helper via pipe. Apr 12 11:17:02 MEA707-ThinkPad-T61 pam_fingerprint-gui[9915]: Return 25 (PAM_IGNORE). Apr 12 11:17:02 MEA707-ThinkPad-T61 xrdp-sesman[9915]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp-sesman ruser= rhost= user=mea707 Apr 12 11:17:04 MEA707-ThinkPad-T61 xrdp-sesman[9915]: (9915)(140181926028608)[DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
I'm not familiar with pam_fingerprint
, but from the looks of the trace above, it looks like you're trying to use this with sesman to authenticate. I don't think this will work.
By default on Ubuntu, sesman will use the authentication process used by other login methods but this can be configured by modifying /etc/pam.d/xrdp-sesman
.
What does the file /etc/pam.d/common-auth
look like on your system? It would be good to know I'm not running off in the wrong direction again!
I installed Fingerprint GUI to make the fingerprint reader functional. XRDP definitely shouldn't be trying to use the fingerprint authentication to remote in, so that's a good catch.
Here is what /etc/pam.d/xrdp-sesman
looks like:
#%PAM-1.0
@include common-auth
@include common-account
@include common-session
@include common-password
And here is what /etc/pam.d/common-auth
looks like:
#
# /etc/pam.d/common-auth - authentication settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
# traditional Unix authentication mechanisms.
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules. See
# pam-auth-update(8) for details.
# here are the per-package modules (the "Primary" block)
auth [success=2 default=ignore] pam_fingerprint-gui.so try_first_identified debug
auth [success=1 default=ignore] pam_unix.so nullok_secure try_first_pass
# here's the fallback if no module succeeds
auth requisite pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
auth required pam_permit.so
# and here are more per-package modules (the "Additional" block)
auth optional pam_ecryptfs.so unwrap
auth optional pam_cap.so
# end of pam-auth-update config
UPDATE:
I disabled fingerprint authentication in PAM and I was able to finally remote in.
As a workaround to be able to keep using the fingerprint reader while having XRDP ignore it, I created a copy of common-auth
and named it common-auth-nofingerprint
and referenced that in /etc/pam.d/xrdp-sesman
.
While that allows me to remote in while maintaining fingerprint functionality on the PC, there are 2 problems now that I am trying to resolve.
1) After booting the Linux PC, whether I login or not, the first time I try to remote in to it using the Remote Desktop client in Windows 10, it will stay at a blank screen for a few seconds and then immediately close. I remote in again, and it remotes in successfully no problem. I don't have anymore issues remoting in until I restart the PC. Minor issue, but can't seem to resolve it and there's no errors in the xrdp or xrdp-sesman logs that I can see.
2) XRDP seems to be breaking launching a Terminal window from the PC itself. I can open a Terminal window while remoted in no problem, but if I logout and then disconnect the remote session and walk over to the Linux computer, if I try to launch a Terminal window, the cursor keeps spinning and never launches it. The only solution I found is to restarting the computer. So something about the XRDP remote session seems to be breaking the Terminal launch command.
The workaround is a good pragmatic solution IMO. It might be possible to get a combined PAM configuration working, but given it's a common file you could end up breaking other stuff. You could pour a lot of time down that particular hole.
With regards to your other problems, here are a couple of things to think about:-
Your description above is very clear, but it's not obvious whether the log-in attempt is causing a session to start or not. It might be that a disconnect is occurring but a session is actually starting, and then you're simply connecting to the started session. After the disconnect, you could see whether Xorg
running on display :10
is visible in the output of ps -ef | grep Xorg
With regards to the same problem, immediately after the disconnect use the following commands to look at the debugging outputs of xrdp
and xrdp-sesman
. The -S -5m
arguments restrict the output to the last 5 minutes::-
sudo journalctl -u xrdp -S -5m
sudo journalctl -u xrdp-sesman -S -5m
With regards to the other problem, you say you're using Cinnamon. I think this uses gnome-terminal
but I'm not certain, so please check. The gnome-terminal
uses a client-server architecture. The sole purpose of the gnome-terminal
command is to contact the gnome-terminal-server
program which is responsible for managing all the terminals in a session. gnome-terminal-server
is started on first contact if it isn't already running. One of the big downsides of this architecture is that if it goes wrong, you can't easily get a terminal up to debug it! One way to do so is to install the xterm
package so if you can at least start a basic terminal to look at things. Once you've got an xterm
up, you can run gnome-terminal
on the command line and see if you get any useful output.
Here is the output of xrdp
and xrdp-sesman
immediately following disconnect using the commands you listed:
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[3357]: (3357)(140137406555968)[INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.6 port 62688
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[3357]: (3357)(140137406555968)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389)
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[4563]: (4563)(140137406555968)[DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[4563]: (4563)(140137406555968)[INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[4563]: (4563)(140137406555968)[INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[4563]: (4563)(140137406555968)[DEBUG] TLSv1.2 enabled
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[4563]: (4563)(140137406555968)[DEBUG] TLSv1.1 enabled
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[4563]: (4563)(140137406555968)[DEBUG] TLSv1 enabled
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[4563]: (4563)(140137406555968)[DEBUG] Security layer: requested 11, selected 1
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[4563]: (4563)(140137406555968)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389)
Apr 14 09:24:31 MEA707-ThinkPad-T61 xrdp[3357]: (3357)(140137406555968)[INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.6 port 62689
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[3357]: (3357)(140137406555968)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389)
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] TLSv1.2 enabled
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] TLSv1.1 enabled
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] TLSv1 enabled
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] Security layer: requested 11, selected 1
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] connected client computer name: MEA707-ThinkPad
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] TLS connection established from ::ffff:192.168.1.6 port 62689: TLSv1.2 with cipher BLANKED OUT
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] xrdp_000011d4_wm_login_mode_event_00000001
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] xrdp_wm_log_msg: sesman connect ok
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] return value from xrdp_mm_connect 0
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] xrdp_wm_log_msg: login successful for display 10
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] xrdp_wm_log_msg: started connecting
Apr 14 09:24:34 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] lib_mod_log_peer: xrdp_pid=4564 connected to X11rdp_pid=4567 X11rdp_uid=1000 X11rdp_gid=1000 client
Apr 14 09:24:34 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] xrdp_wm_log_msg: connected ok
Apr 14 09:24:35 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
Apr 14 09:24:35 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] Closed socket 20 (AF_INET6 ::1 port 45050)
Apr 14 09:24:36 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] The following channel is allowed: rdpdr (0)
Apr 14 09:24:36 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] The following channel is allowed: rdpsnd (1)
Apr 14 09:24:36 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] The following channel is allowed: cliprdr (2)
Apr 14 09:24:36 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[INFO ] The following channel is allowed: drdynvc (3)
Apr 14 09:24:36 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] The allow channel list now initialized for this session
Apr 14 09:24:37 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389)
Apr 14 09:24:37 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] xrdp_mm_module_cleanup
Apr 14 09:24:37 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] Closed socket 21 (AF_UNIX)
Apr 14 09:24:37 MEA707-ThinkPad-T61 xrdp[4564]: (4564)(140137406555968)[DEBUG] Closed socket 22 (AF_UNIX)
Apr 14 09:24:32 MEA707-ThinkPad-T61 xrdp-sesman[3347]: (3347)(140366554920256)[INFO ] A connection received from ::1 port 45050
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp-sesman[3347]: (3347)(140366554920256)[INFO ] ++ created session (access granted): username mea707, ip ::ffff:192.168.1.6:62689 - socket:
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp-sesman[3347]: (3347)(140366554920256)[INFO ] starting Xorg session...
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp-sesman[3347]: (3347)(140366554920256)[DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp-sesman[3347]: (3347)(140366554920256)[DEBUG] Closed socket 9 (AF_INET6 :: port 6010)
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp-sesman[3347]: (3347)(140366554920256)[DEBUG] Closed socket 9 (AF_INET6 :: port 6210)
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp-sesman[4565]: (4565)(140366554920256)[INFO ] calling auth_start_session from pid 4565
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp-sesman[3347]: (3347)(140366554920256)[DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp-sesman[4565]: pam_unix(xrdp-sesman:session): session opened for user mea707 by (uid=0)
Apr 14 09:24:33 MEA707-ThinkPad-T61 xrdp-sesman[4565]: (4565)(140366554920256)[DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
Apr 14 09:24:34 MEA707-ThinkPad-T61 xrdp-sesman[4565]: (4565)(140366554920256)[DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
Apr 14 09:24:34 MEA707-ThinkPad-T61 xrdp-sesman[4565]: (4565)(140366554920256)[CORE ] waiting for window manager (pid 4566) to exit
Apr 14 09:24:37 MEA707-ThinkPad-T61 xrdp-sesman[3347]: (3347)(140366554920256)[INFO ] ++ terminated session: username mea707, display :10.0, session_pid 4565, ip ::ffff:192.168.
And here is the output from ps -ef | grep Xorg
root 1210 1188 3 09:49 tty7 00:00:04 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
mea707 4110 3734 0 09:52 pts/0 00:00:00 grep --color=auto Xorg
You're correct that Cinnamon uses gnome-terminal
. One way I found out of launching the terminal after a remote session disconnects or I end it, is if I right click on the desktop or any folder and choose "Open as Root" put in my credentials and right click anywhere and choose "Open in Terminal" it launches fine, but in root mode of course. Only way I have found to open the terminal without root after a remote session is to restart the PC, quite annoying.
One of the things that seems to have some impact is my .xsession
file in the home folder. It is set as env -u SESSION_MANAGER -u DBUS_SESSION_BUS_ADDRESS cinnamon-session
per these directions:
https://forums.linuxmint.com/viewtopic.php?t=272329
If I remove everything but cinnamon-session
, I no longer have the disconnect on first login attempt and no longer have issues with it breaking the terminal after ending a session. The drawback however is I can only remote in while logged out.
Appreciate your help and patience in trying to resolve this!
Couple observations:
I have found that I am able to avoid having to restart the Linux PC if I ensure that I log off or "shut down" in the remoted desktop from the Windows PC and also log off and re-log in on the Linux PC.
If I simply exit/close the remote desktop client in Windows, then logging off/on the Linux PC does not fix the Terminal, only restarting it does. However, if I inadvertently exit/close the remote desktop client in Windows, I can remote back in and then properly log off and then go back to the Linux PC and logging off/on fixes the Terminal.
I also noticed that when I do this proper log off on both PCs, if I try remoting in at that point, it does disconnect at the first attempt.
So there seems to be some correlation of some sort between the disconnect on first remote attempt and the Terminal breaking issue.
UPDATE 2:
I found out there's actually several applications that are being broken besides gnome-terminal
.
I tried launching Celluloid and it exhibited the same behavior as gnome-terminal
with the spinning cursor and never launching.
I tried to see what else is also breaking and came up with the following:
Calendar GNOME Maps GNOME Weather Disks Utility
The common denominator is they're all GNOME apps, not sure if that is coincidence or not. GNOME Online Accounts however was not affected.
There may be others, but this is what I tested. Plenty of other applications such as VLC Media Player, LibreOffice, Firefox, Chromium, etc. are unaffected and launch just fine after an xRDP session.
Thanks for that.
I'll set up a Mint VM and try to reproduce the issues you're having. It might take me a little while to do that, and I may have some questions as I go along.
@matt335672 No problem, I appreciate the help!
One thing that isn't working while remoted in is right clicking on the desktop or any folder and clicking "Open as Root." The option to click it is there, but it does nothing.
On a separate note, I've been trying to get VNC to work over xRDP, I've tried x11vnc to remote to the local desktop and it works fine, with all functions and it's not breaking any applications like the Xorg connection is.
What is not working in VNC is if I use the Xvnc connection type. This is how it's displayed in my xrdp.ini
file:
[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
#xserverbpp=24
#delay_ms=2000
With both x11vnc and tightvnc, it ties to connect to port 5910 and fails. I know nothing is open in port as the x11vnc vnc session is on 5900 and the tightvnc session is on 5901. As this is beyond my realm of expertise, is xRDP supposed to open another port, such as 5910 if it's not currently open?
Here are my logs from the failed 5910 vnc session:
[20200415-19:06:45] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.6 port 65145
[20200415-19:06:45] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389)
[20200415-19:06:45] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20200415-19:06:45] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20200415-19:06:45] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20200415-19:06:45] [DEBUG] TLSv1.2 enabled
[20200415-19:06:45] [DEBUG] TLSv1.1 enabled
[20200415-19:06:45] [DEBUG] TLSv1 enabled
[20200415-19:06:45] [DEBUG] Security layer: requested 11, selected 1
[20200415-19:06:45] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389)
[20200415-19:06:45] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.6 port 65149
[20200415-19:06:45] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.9 port 3389)
[20200415-19:06:45] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20200415-19:06:46] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20200415-19:06:46] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20200415-19:06:46] [DEBUG] TLSv1.2 enabled
[20200415-19:06:46] [DEBUG] TLSv1.1 enabled
[20200415-19:06:46] [DEBUG] TLSv1 enabled
[20200415-19:06:46] [DEBUG] Security layer: requested 11, selected 1
[20200415-19:06:46] [INFO ] connected client computer name: MEA707-THINKPAD
[20200415-19:06:46] [INFO ] TLS connection established from ::ffff:192.168.1.6 port 65149: TLSv1.2 with cipher BLANKED OUT
[20200415-19:06:46] [DEBUG] xrdp_0000139c_wm_login_mode_event_00000001
[20200415-19:06:46] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20200415-19:06:46] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20200415-19:06:53] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20200415-19:06:54] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20200415-19:06:54] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20200415-19:06:54] [DEBUG] return value from xrdp_mm_connect 0
[20200415-19:06:54] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20200415-19:06:54] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20200415-19:06:54] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910
[20200415-19:06:57] [DEBUG] VNC error 1 after security negotiation
[20200415-19:06:58] [DEBUG] VNC error before sending share flag
[20200415-19:06:58] [DEBUG] VNC error before receiving server init
[20200415-19:06:58] [DEBUG] VNC error before receiving pixel format
[20200415-19:06:58] [DEBUG] VNC error before receiving name length
[20200415-19:06:58] [DEBUG] VNC error before receiving name
[20200415-19:06:58] [DEBUG] xrdp_wm_log_msg: VNC error - problem connecting
[20200415-19:06:58] [DEBUG] Closed socket 21 (AF_INET6 ::ffff:127.0.0.1 port 45324)
[20200415-19:06:58] [DEBUG] xrdp_wm_log_msg: some problem
[20200415-19:06:58] [DEBUG] xrdp_mm_module_cleanup
[20200415-19:06:58] [DEBUG] VNC mod_exit
[20200415-19:06:58] [DEBUG] Closed socket 20 (AF_INET6 ::1 port 42124)
[20200415-18:53:43] [INFO ] A connection received from ::1 port 41698
[20200415-18:53:43] [INFO ] ++ created session (access granted): username mea707, ip ::ffff:192.168.1.6:64984 - socket: 12
[20200415-18:53:43] [INFO ] starting Xvnc session...
[20200415-18:53:44] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
[20200415-18:53:44] [DEBUG] Closed socket 9 (AF_INET6 :: port 6010)
[20200415-18:53:44] [DEBUG] Closed socket 9 (AF_INET6 :: port 6210)
[20200415-18:53:44] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20200415-18:53:44] [INFO ] calling auth_start_session from pid 2730
[20200415-18:53:44] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
[20200415-18:53:44] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20200415-18:53:44] [INFO ] Xvnc :10 -auth .Xauthority -geometry 1920x1080 -depth 32 -rfbauth /home/mea707/.vnc/sesman_mea707_passwd:10 -bs -nolisten tcp -localhost -dpi 96
[20200415-18:53:54] [ERROR] X server for display 10 startup timeout
[20200415-18:53:54] [CORE ] waiting for window manager (pid 2731) to exit
[20200415-18:53:54] [ERROR] X server for display 10 startup timeout
[20200415-18:53:54] [ERROR] another Xserver might already be active on display 10 - see log
[20200415-18:53:54] [DEBUG] aborting connection...
[20200415-18:53:54] [CORE ] window manager (pid 2731) did exit, cleaning up session
[20200415-18:53:54] [INFO ] calling auth_stop_session and auth_end from pid 2730
[20200415-18:53:54] [DEBUG] cleanup_sockets:
[20200415-18:53:54] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdp_chansrv_socket_10
[20200415-18:53:54] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdpapi_10
[20200415-18:53:54] [DEBUG] cleanup_sockets: failed to delete /var/run/xrdp/sockdir/xrdpapi_10
[20200415-18:53:55] [INFO ] ++ terminated session: username mea707, display :10.0, session_pid 2730, ip ::ffff:192.168.1.6:64984 - socket: 12
I'll take your 'separate note' above as that's an easy one.
The Xvnc
connection type is similar to Xorg
, in that the session manager starts an X server and then runs a session on it. The X server in this case however is Xvnc
and not Xorg
with a module. XRDP converts between the simple RFB protocol used by Xvnc
and the RDP protocol on the fly.
Xvnc
is the original session type. It's been largely superseded by Xorg
, but there are a couple of situations where it works better.
If you want to try it, you'll need to install an Xvnc
server. You could try tigervnc-standalone-server
, but there are other options which might be worth exploring.
Hi @MEA707
I'm cautiously optimistic I may have gotten somewhere with this.
After playing with my vanilla Cinnamon VM, I think you could be encountering up to two problems:-
xorgxrdp
package won't work on the latest Mint update - you do need xorgxrdp-hwe-18.04
installed instead. The clue for this for me was the file ~/.xorgxrdp.10.log
contains parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
- see #1159. Given you've been getting something working anyway, I think you may already have this installed.dbus-user-session
package, installed by default does not support multiple graphical sessions started by the same user. You can read the description of the Debian package here. The Mint package is a different version, but the description is the same.I'm not entirely aware of the implications of starting a session in the way mentioned in your Mint forum posting. Given that this is trying to fight what dbus-user-session
is trying to achieve, I can see it could maybe work, and then get broken by an update. Also, since the package description for dbus-user-session
tells us what to do, I think that's the way to go.
Can you do the following logged in on the console? Regardless of your current config this should install the packages you need and remove the ones you don't.
rm -f ~/.xsession
sudo apt install -y xorgxrdp-hwe-18.04
sudo apt remove -y dbus-user-session
sudo apt install -y dbus-x11
sudo reboot
After I do this, I can use either the Xorg
or Xvnc
backend together with the console. Importantly, the following command gives a different output in each session:-
env | grep DBUS
Please let us know how you get on with this. I suspect this problem may be affecting quite a few people.
So, I've been watching this thread for some time trying to decide if this applied to me. I think now, after you last post, it does.
I had XRDP working with Ubuntu 18.04 on Gnome 3.32 (Yes, I recognize Gnome 3.32 doesn't come standard with Ubuntu 18.04, but I wanted fractional scaling!), but then made the following changes:
Now, I tried to go back to XRDP but I can't, because of the Cannot open /dev/tty0 (Permission denied)
error. If memory serves, it was something vglserver_config did that broke it, but running the "uninstall" command on it doesn't fix things, so that might not be it.
I have tried all sorts of variants of xserver-xorg-legacy. I tried uninstalling dbus-user-session and installing dbus-x11 (for a while, both were installed SxS). I've tried the chmod 0660 trick on dev/tty* but that only moves the error down the pipe so that it can't access psaux for the mouse.
Still nothing. I'd love to help test patches or debug in any way I can. I would love to have XRDP back, because otherwise I have to suffer with NoMachine (my company's supported solution barf)
XVNC works (it's glacially slow), but xorgxrdp doesn't. I have both xrdp and xorgxrdp building from source at the head of their respective github repos.
Hi @Nexarian
Could I trouble you to open a new issue on this? I'm hoping we're getting near a resolution on the original issue, and yours sounds like it's related but not the same. It sounds to me like the xorgxrdp module isn't loading for some reason, and we can hopefully debug that using some other techniques,
If it's in another thread, it may be easier for others to follow.
Thanks and speak soon.
Yes, absolutely! https://github.com/neutrinolabs/xrdp/issues/1550
Hi @matt335672,
You are correct, I already have xorgxrdp-hwe-18.04
due to the dependency issues of xorgxrdp
which prevents its installation.
I took a look and turns out Mint 19.3 comes with both dbus-user-session
and dbus-x11
installed. I ran your command line prompts and therefore removed dbus-user-session
and now I am able to launch a terminal window following an xRDP session no problem.
The "Open as Root" though still does not work, I guess this is a separate issue.
Since Mint comes with both dbus-user-session
and dbus-x11
installed, will there be any loss of functionality by removing dbus-user-session
? So far I cannot tell.
Thanks again for all your help!
I've had a look into your "Open as Root" issue, and it's all to do with polkit.
Polkit is using an action called org.nemo.root
to authorize nemo (the file manager) to run as root
The action file /usr/share/polkit-1/actions/org.nemo.root.policy
contains these lines:-
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
The allow_any
default will correspond to your XRDP session as this isn't a local session. The allow_active
will apply to your console session as it is a local active session. Presumably local sessions are considered to be more secure.
You can override this by creating the file /etc/polkit-1/localauthority/50-local.d/xrdp-nemo.pkla
with the following contents:-
[Authorize nemo for remote sessions]
Identity=unix-user:*
Action=org.nemo.root
ResultAny=auth_admin_keep
Note that this version of polkit is quite old, and you can't use a rules file to do this. You may find Mint 20 will be different as it will be based on Ubuntu 20.04 LTS.
There may well be other things that would need authorizing in this way, but I hope that gives you an idea. You'll have to make up your own mind regarding the security or otherwise of this approach, depending on your own environment.
I can't see there would be any loss of functionality in using a session DBUS in this way. The separate desktops demand it, and it's been a normal way of working for some years, pre-systemd.
The above description is a bit brief as I've got limited time today, but I hope it's useful. Let me know if you've got any other questions.
Thank you, this polkit override worked well!
This isn't probably specifically an issue with xRDP, but I have found that with the fingerprint reader enabled, I cannot sudo in terminal during a remote session via xRDP. Before I have a chance to enter the password, it errors out as shown here:
If I disable fingerprint authorization in PAM, I no longer have issues doing sudo while remotely connected through xRDP.
I may just disable fingerprint authorization for sudo altogether though, which would solve this issue.
I suspect this is more an issue with the PAM stack not coping with the lack of a fingerprint GUI, but it would take a bit of debugging to find out.
Thanks for your feedback on the dbus-user-session
change. I suspect this should be shared with a wider audience, so I'm going to look back over some of the other threads in this forum and see if any can benefit from being pointed towards this one.
Glad to help @matt335672. Sorry for the late response, got busy. Thanks for your patience in going through this with me. I am not new to computers, but I am new to Linux.
I did discover an issue with xRDP as it relates to audio, but I will open another thread for that as it's different from this issue.
I have Linux Mint 19.3 64-bit Cinnamon installed on a Lenovo ThinkPad T61 and installed both xrdp and xorgxrdp from the PPA via the terminal.
I have tried to remote in from a Windows 10 PC using Microsoft Remote Desktop Connection and while I am able to get into the XRDP screen, it's not able to log into the session.
Below is my screen from the Windows 10 PC before and after entering my credentials.
Here is the log output from XRDP:
Anyone know what might be causing this and if there's a resolution?
Thanks.