Page 1 of 1
Must be Superuser to use mount
Posted: 2025-01-12 02:24
by EuroNiceguy
Hi Everyone
I have used autofs for the computer to recognise and mount USB thumb drives.
When I have clicked on the thumb drive icon in the file manager, the popup with the following appears;
"Unable to access location
mount: /mnt/usb-Sandisk:
must be superuser to use mount.
dmesg(1) may have more information after failed mount system call.
Can you advise on how this can be configured for all users to be able to mount USB's and can you recommend another way if you don't recommend autofs please.
Thank you in advance,
Michael
Re: Must be Superuser to use mount
Posted: 2025-01-12 03:11
by CwF
Methods vary, state your specifics -what DE? Gnome?
Re: Must be Superuser to use mount
Posted: 2025-01-12 06:05
by EuroNiceguy
I'm using Gnome, and using the latest Debian
Re: Must be Superuser to use mount
Posted: 2025-01-14 06:29
by EuroNiceguy
Hi Everyone,
I am sorry for hassling everyone, Am i able to get assistance please.
Thank you in advance,
Michael
Re: Must be Superuser to use mount
Posted: 2025-01-14 06:54
by dilberts_left_nut
Why use autofs?
Doesn't gnome take care of all that?
Re: Must be Superuser to use mount
Posted: 2025-01-14 09:23
by EuroNiceguy
Gnome didn't have anything of this nature,
When I launched the Disk utility, the USB thumb drive did show on there.
Which way would you recommend, and can you advise on how to implement the recommendation in the easiest way (noob friendly) please
Re: Must be Superuser to use mount
Posted: 2025-01-14 10:12
by lindi
Disk Utility in Gnome talks to the udisks2 API over D-Bus. The default policy for that service allows authenticated local users to operate on removable storage devices. When you use it to mount a USB drive, it takes care to set ACLs so that other users of the system cannot access your USB drive contents. From command-line you can use "udisksctl" to do the mounting.
Re: Must be Superuser to use mount
Posted: 2025-01-14 19:25
by EuroNiceguy
So how do I have the computer automount any USB drive without the need to be a superuser?
Re: Must be Superuser to use mount
Posted: 2025-01-15 05:34
by dilberts_left_nut
You just plug it in (after undoing whatever you did to break it in the first place).
Re: Must be Superuser to use mount
Posted: 2025-01-15 19:32
by EuroNiceguy
I just removed autofs, and I still have the same popup come in as per attached image.
Re: Must be Superuser to use mount
Posted: 2025-01-15 23:15
by CwF
I'm not a gnome, but I do expect a default gnome installation to show the usb, and with a password would mount the usb. To do so without a password there are either gnome configuration options which I don't know about, or you'll need to look into polkit permission for the gnome desktop.
Perhaps a gnome user will chime in
Re: Must be Superuser to use mount
Posted: 2025-01-16 00:31
by EuroNiceguy
I expected for Gnome to have this feature as default, or any Desktop environment for that matter.
Re: Must be Superuser to use mount
Posted: 2025-01-16 14:11
by arzgi
I have not used Gnome, desktops nowadays automount usb-plugins, i have added my username to pludgev for ages, not sure it is needed anymore. Xfce, which I use, mounts usb-[sticks, drives] to /media/$USERNAME/nnn
where $USERNAME is your username or login, nnn it usaually some random number/letter combination.
You dont need to do anything else than connect the plugin.
Would suprprised if that would not work in Gnome.
Re: Must be Superuser to use mount
Posted: 2025-01-16 18:57
by EuroNiceguy
Can you advise of the Terminal command for this please
Or would it be better to make me a Superuser as well as root?
Re: Must be Superuser to use mount
Posted: 2025-01-16 19:46
by cfb
This computer is running Debian 12 (GNOME) and as soon as a USB thumb drive is connected it shows up in Files and its filesystem is automatically mounted at
"<name>" is the UUID or a name given to the partition.
Example:
Code: Select all
$ lsblk -f /dev/sdb1
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sdb1 vfat FAT16 43EF-2C02 62,3M 0% /media/<username>/43EF-2C02
I have done absolutely nothing for this to work.
Re: Must be Superuser to use mount
Posted: 2025-01-17 02:57
by pbear
Testing in a VM, I can confirm Gnome by default automatically mounts a USB drive. For example:
Code: Select all
pbear@debian:~$ mount | grep /dev/sd
/dev/sda2 on /media/pbear/Linux-Shuttle type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,uhelper=udisks2)
By the way, this is a default standard installation, so the primary (and only) user (besides root) does not have sudo privileges.
No idea how you got where you are. Frankly, the simplest (perhaps only) solution would be to reinstall.
Re: Must be Superuser to use mount
Posted: 2025-01-17 06:39
by EuroNiceguy
I am thinking of doing this.
During the installation process, is there anything you recommend during the installation process?
Re: Must be Superuser to use mount
Posted: 2025-01-17 22:08
by Mort
I'm not familiar with autofs. As others have said, the flash drive should be detected as a block device, and from there mounting it is trivial. In the screenshot above, it appears that you are attempting to mount it to the /mnt directory, which can be tricky due to the file permissions in that directory. Have you tried mounting it to the /media directory?
Re: Must be Superuser to use mount
Posted: 2025-01-18 00:59
by pbear
EuroNiceguy wrote: 2025-01-17 06:39
... is there anything you recommend during the installation process?
To solve the problem of this thread? Nothing needed. The defaults work fine for mounting with file manager, Disks (installed by default in Gnome and Cinnamon), and the disk managers used in other desktops.
One thing to know is that, as mentioned, the Standard Installer by default doesn't give the primary user sudo privileges. If you're used to using sudo, change that. There are several ways. Ask if you need guidance.