1

Solution:

nscd was missing on some machine. Everything is back to normal with nscd installed everywhere.

Update 6:

Here comes the joke. I freshly reinstalled the machine with a debian 10.1, installed NIS client and joined the machine to the domain. Logged-in with different users, nobody can mount USB storage!

Then logged in with a local user and everything works !

Update 5:

Tried to add a polkit rule like:

[Storage Permissions]
Identity=unix-user:USER
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.filesystem-mount-system
ResultAny=yes
ResultInactive=yes
ResultActive=yes

did not fix the issue

Update4:

So, it's working fine with a new user. I tried then deleting my old account, delete it's home folder, "make all" in the NIS directory and recreate a user with the same username as before... and I can't mount USB!

When tailing the .xsession-errors file in home folder, I have the exact sames lines for a working user and a non working one

thunar-volman: Unsupported USB device type "usb".
thunar-volman: Unsupported USB device type "usb-storage".
thunar-volman: Unknown block device type "disk".

Is there a cache or something similar stored somewhere in the NIS server or on the client which can cause this mess?

Update3:

Not expected at all but just created a new user in my NIS setup and everything works fine for him! I'll diff profiles to see what's wrong in there

Update2:

Installed gnome on the machine, same issue.

Also tried to launch XFCE directly via startxfce4 and not lightdm, not better.

Update1:

Compared all loaded modules between a working machine and a faulty one, problem is not there

Original post:

Upgraded a bunch of Debian machine from stretch to buster. Those machines are running XFCE and are part of a NIS domain. On a few of them, users can't mount USB storage anymore from XFCE after upgrade while it was working fine under stretch.

USBdisk icon displayed on the desktop but when double click on it -> Failed to mount "keyName" Not authorized to perform operation

==> syslog <==
Oct 17 07:34:11 machine kernel: [  184.011692] usb 3-2: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.10
Oct 17 07:34:11 machine kernel: [  184.011696] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 17 07:34:11 machine kernel: [  184.011698] usb 3-2: Product: DataTraveler 3.0
Oct 17 07:34:11 machine kernel: [  184.011700] usb 3-2: Manufacturer: Kingston
Oct 17 07:34:11 machine kernel: [  184.011701] usb 3-2: SerialNumber: 408D5C1653D4E2A1B98AA273
Oct 17 07:34:11 machine mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2"
Oct 17 07:34:11 machine mtp-probe: bus: 3, device: 2 was not an MTP device
Oct 17 07:34:11 machine kernel: [  184.039916] usb-storage 3-2:1.0: USB Mass Storage device detected
Oct 17 07:34:11 machine kernel: [  184.040232] scsi host10: usb-storage 3-2:1.0
Oct 17 07:34:11 machine kernel: [  184.040336] usbcore: registered new interface driver usb-storage
Oct 17 07:34:11 machine kernel: [  184.043119] usbcore: registered new interface driver uas
Oct 17 07:34:11 machine mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2"
Oct 17 07:34:11 machine mtp-probe: bus: 3, device: 2 was not an MTP device
Oct 17 07:34:12 machine kernel: [  185.059788] scsi 10:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
Oct 17 07:34:12 machine kernel: [  185.060205] sd 10:0:0:0: Attached scsi generic sg3 type 0
Oct 17 07:34:12 machine kernel: [  185.060459] sd 10:0:0:0: [sdc] 60604416 512-byte logical blocks: (31.0 GB/28.9 GiB)
Oct 17 07:34:12 machine kernel: [  185.060766] sd 10:0:0:0: [sdc] Write Protect is off
Oct 17 07:34:12 machine kernel: [  185.060768] sd 10:0:0:0: [sdc] Mode Sense: 45 00 00 00
Oct 17 07:34:12 machine kernel: [  185.061076] sd 10:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Oct 17 07:34:12 machine kernel: [  185.082929]  sdc: sdc1
Oct 17 07:34:12 machine kernel: [  185.084849] sd 10:0:0:0: [sdc] Attached SCSI removable disk
  • There is no udev or polkit rules on the machines.
  • I did a comparison of installed packages using dpkg -l between 2 machines (one working fine, the other one not), except for a few java dev packages, there is no differences
  • When logged in as root, I can mount usb storage without problem
  • I did a file comparison of /etc/ between 2 machines using rsync -anvc, did not find any big things in there
  • tried to apt install --reinstall thunar, thunar-volman and related gvfs packages
  • Upgraded bios/fw of motherboard

After reading a few old posts about that on the web, we launched thunar from terminal using "dbus-launch thunar" and we got this error.

thunar-volman: Unsupported USB device type "usb". thunar-volman:
Unsupported USB device type "usb-storage". thunar-volman: Unknown
block device type "disk".

Else, nothing in syslog/messages.

  • Have you looked closely to differences between /etc/groups? Could it be your user is not member of the plugdev group, or something like that? – SYN Oct 17 at 8:01
  • As those machines are part of a NIS domain I don't know if groups memberships are the same. But anyway, when I type "groups <username>" I'm member of only one group. And then, why was it working fine under stretch on the same machine? – darxmurf Oct 17 at 8:19
  • I added my username in the plugdev group but did not fix the issue – darxmurf Oct 17 at 8:26
  • Did you logout & login again after adding your account to the group? Group membership changes take effect at the next login, not immediately. – telcoM Oct 18 at 7:16
  • See unix.stackexchange.com/questions/537472/… (although unscd used to work more reliably for me). – Ferenc Wágner Oct 19 at 20:27
0

# mkdir -p /etc/polkit-1/rules.d

# cd /etc/polkit-1/rules.d

# nano 50-default.rules

[Storage Permissions]
Identity=unix-user:USER
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.filesystem-mount-system
ResultAny=yes
ResultInactive=yes
ResultActive=yes

And finally reboot. It worked for me.

  • It was a nscd related problem on my side. Polkit rule did not solve the problem. – darxmurf Oct 25 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.