neutrinolabs / xrdp

xrdp: an open source RDP server
http://www.xrdp.org/
Apache License 2.0
5.58k stars 1.73k forks source link

USB is not being automounted when logged in with non-root user #3078

Closed modernNeo closed 1 month ago

modernNeo commented 3 months ago

xrdp version

0.9.21.1

Detailed xrdp version, build options

xrdp 0.9.21.1
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2020 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-ipv6
      --enable-jpeg
      --enable-fuse
      --enable-rfxcodec
      --enable-opus
      --enable-painter
      --enable-vsock
      --build=x86_64-linux-gnu
      --prefix=/usr
      --includedir=${prefix}/include
      --mandir=${prefix}/share/man
      --infodir=${prefix}/share/info
      --sysconfdir=/etc
      --localstatedir=/var
      --disable-silent-rules
      --libdir=${prefix}/lib/x86_64-linux-gnu
      --libexecdir=${prefix}/lib/x86_64-linux-gnu
      --disable-maintainer-mode
      --disable-dependency-tracking
      --with-socketdir=/run/xrdp/sockdir
      build_alias=x86_64-linux-gnu
      CFLAGS=-g -O2 -ffile-prefix-map=/build/xrdp-QTF2mN/xrdp-0.9.21.1=. -fstack-protector-strong -Wformat -Werror=format-security 
      LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 
      PKG_CONFIG_PATH=/build/xrdp-QTF2mN/xrdp-0.9.21.1/pkgconfig

  Compiled with OpenSSL 3.0.11 19 Sep 2023

Operating system & version

Debian GNU/Linux 12 (bookworm)

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

xorgxrdp 1:0.9.19-1

What desktop environment do you use?

Cinnamon

Environment xrdp running on

physical machine with Alder Lake-P Integrated Graphics Controller

What's your client?

No response

Area(s) with issue?

Other

Steps to reproduce

  1. login with non-root user
  2. plug in a USB on the physical machine that is being RDPed into

✔️ Expected Behavior

for the usb to be auto-mounted

❌ Actual Behavior

the usb is not auto-mounted. instead i see this if I click on the USB

remmina_the-machine local_the-machine local_2024517-205822

Anything else?

No response

matt335672 commented 3 months ago

Duplicate of #2934. Have a look at this comment and below.

In summary; by default polkit won't allow this operation as you're not logged in to the console. This is to prevent a security hole where remote users can read USB sticks of other users attached to the console.

modernNeo commented 3 months ago

oh, sorry for not responding sooner...for some reason github didn't notify me of the new comments on this issue....will follow-up tomorrow

modernNeo commented 2 months ago

how come the root user can see the USB drive then?

matt335672 commented 2 months ago

You'd have to check out the polkit rules to be sure exactly what is happening.

matt335672 commented 2 months ago

@modernNeo - do you need any more help with this?

modernNeo commented 2 months ago

do I need to follow the instructions in this message to get polkit to allow my users to mount USB drives?

matt335672 commented 2 months ago

You'll need to do something like that to figure out exactly what is happening with Polkit.

The linked message is for GNOME rather than Cinnamon, so you may find the polkit actions are not the same.

modernNeo commented 2 months ago

alright, I will get to this soon and report back on how it went.