You are not logged in.
Hi all,
I'm using ArchLinux on an external harddrive so I can work machine independant. From time to time I need to mount some of the internal harddrives but I didn't want to create a fstab entry for every possible drive. So I added my user to a group that is allowed to use mount and umount without permission (via visudo).
%users ALL=NOPASSWD: /usr/bin/mount
%users ALL=NOPASSWD: /usr/bin/umount
The drives are owned by group disk where my user was also added to get r/w permission. And I created a mountpoint directory in /home/<username> to avoid struggle with the file systems access rights.
When trying to mount a drive with
mount /dev/sda2 ~/mntthe system keeps telling me that only root can do that.
When using sudo it works. What did I miss?
Thanks in advance.
Last edited by IlikePepsi (2015-01-09 11:14:46)
Offline
Isn't that the expected behavior?
Offline
So I added my user to a group that is allowed to use mount and umount without permission
No, you didn't. You gave that group permission to run those two commands without entering a password when running them with sudo. It doesn't change the permissions/functionality of the binaries in question.
What did I miss?
I think you probably missed this: https://wiki.archlinux.org/index.php/Udisks
Last edited by WorMzy (2015-01-09 10:17:47)
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
IlikePepsi wrote:So I added my user to a group that is allowed to use mount and umount without permission
No, you didn't. You gave that group permission to run those two commands without entering a password when running them with sudo. It doesn't change the permissions/functionality of the binaries in question.
Ah ok, that's what I got wrong. I thought I could use mount without the prepending sudo after the modifications. Thanks for pointing that out.
Offline