trying to mount a micro USB disk as a regular user on a Linux laptop on which I don't have admin rights ...

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

trying to mount a micro USB disk as a regular user on a Linux laptop on which I don't have admin rights ...

Albretch Mueller-3
$ mount /dev/sdc1
mount: can't find /dev/sdc1 in /etc/fstab

$ umount /dev/sdc1

$ mount --types vfat /dev/sdc1 /media/user/5C51-D400
mount: only root can use "--types" option

$ mount /dev/sdc1 /media/user/5C51-D400
mount: only root can do that

$ mount /dev/sdc1
mount: can't find /dev/sdc1 in /etc/fstab

$

 lbrtchx

Reply | Threaded
Open this post in threaded view
|

Re: trying to mount a micro USB disk as a regular user on a Linux laptop on which I don't have admin rights ...

Eric S Fraga
If pmount is installed/available, 'pmount sdc1' will mount the disk onto
/media/sdc1.

--
Eric S Fraga via Emacs 28.0.50 & org 9.3.6 on Debian bullseye/sid

Reply | Threaded
Open this post in threaded view
|

Re: trying to mount a micro USB disk as a regular user on a Linux laptop on which I don't have admin rights ...

deloptes-2
In reply to this post by Albretch Mueller-3
Albretch Mueller wrote:

> $ mount --types vfat /dev/sdc1 /media/user/5C51-D400
> mount: only root can use "--types" option

this is not supposed to be mounted there from the command line. use the file
browser and don't forget to add the user to plugdev (if I am not mistaken)
after adding to the group you have to logout and login again

Reply | Threaded
Open this post in threaded view
|

Re: trying to mount a micro USB disk as a regular user on a Linux laptop on which I don't have admin rights ...

Jonathan Dowland-5
On Tue, May 12, 2020 at 09:03:51PM +0200, deloptes wrote:
>this is not supposed to be mounted there from the command line. use the file
>browser and don't forget to add the user to plugdev (if I am not mistaken)
>after adding to the group you have to logout and login again

This is a misleading/mistaken reply. Desktop environments indeed do
offer this feature, but it's not meant to be "desktop environment
exclusive". In most cases they're leveraging "udisks", which provides
"udisksctl" that can be used to achieve this from the command line.

I would recommend udisks over pmount.


--
👱🏻 Jonathan Dowland
✎    [hidden email]
🔗 https://jmtd.net

Reply | Threaded
Open this post in threaded view
|

Re: trying to mount a micro USB disk as a regular user on a Linux laptop on which I don't have admin rights ...

Albretch Mueller-3
In reply to this post by Eric S Fraga
On 5/12/20, Eric S Fraga <[hidden email]> wrote:
> If pmount is installed/available, 'pmount sdc1' will mount the disk onto
> /media/sdc1.

 I don't think pmount is installed, but I will check anyway. My
options seems hopeless.

 I can't even understand why they would mount a drive as root. Isn't
that more problematic from a security point of view?

 thanks anyway
 L

Reply | Threaded
Open this post in threaded view
|

Re: trying to mount a micro USB disk as a regular user on a Linux laptop on which I don't have admin rights ...

Andrei POPESCU-2
On Jo, 14 mai 20, 12:43:53, Albretch Mueller wrote:
>
>  I can't even understand why they would mount a drive as root. Isn't
> that more problematic from a security point of view?

In a typical *nix environment it shouldn't matter who mounts the
filesystem, permissions are anyway at directory / file level.

It gets more complicated if the filesystem(s) in question don't have a
concept of permissions (FAT) or the permissions are not compatible with
*nix (NTFS).

Kind regards,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: trying to mount a micro USB disk as a regular user on a Linux laptop on which I don't have admin rights ...

The Wanderer
In reply to this post by Albretch Mueller-3
On 2020-05-14 at 06:43, Albretch Mueller wrote:

> On 5/12/20, Eric S Fraga <[hidden email]> wrote:
>
>> If pmount is installed/available, 'pmount sdc1' will mount the disk
>> onto /media/sdc1.
>
> I don't think pmount is installed, but I will check anyway. My
> options seems hopeless.
>
> I can't even understand why they would mount a drive as root. Isn't
> that more problematic from a security point of view?
Depends on what you consider the alternative to be.

To start out with, in order to mount a drive at all, you have to have
sufficient permissions on the device node which represents the disk. If
an ordinary user had those permissions, then that user could read the
contents of the disk without mounting it (thereby bypassing file-level
security on any files on that disk), and/or write directly to the disk
(thereby trashing the disk contents, or - with additional sophistication
- replacing them with other, potentially malicious, data).

Beyond that, since a mount can be done to any directory path, consider
the security implications if a random user could mount an arbitrary
device (or file) over, say, /etc or /usr or ~/.config/ or some other
important path. Even if done by accident with a harmless filesystem,
something like that could be catastrophic, or at least lead to denial of
service because of missing critical files; if done intentionally with a
malicious filesystem, you could see sensitive data getting written to
the mounted device and thereby leaked, or externally-supplied malicious
programs getting run as privileged users.

Requiring that a given mount-path/device-node pair be listed in
/etc/fstab before a non-root user can explicitly mount it avoids both of
those problems, at the cost of limiting the mount flexibility of
everyone who can't write to that file.

Various other tools (including pmount and udisks) have since been
created to mitigate that limitation. and for good reason, but some
people still prefer to stick with the /etc/fstab listing as a
mount-security design.

(Note that I'm partly extrapolating from observation, rather than
speaking from certain knowledge, but I'm mostly confident that this is
an accurate description.)

--
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw


signature.asc (849 bytes) Download Attachment