On 1/8/19 1:57 AM, Patrick Dupre wrote:
I wanted that a user be able to do: mount /dev/mapper/VolGrpUsr_DK0-home /mnt/USB
With visudo, I did pdupre localhost=/usr/bin/mount /dev/mapper/VolGrpUsr_DK0-home /mnt/USB/
(pdupre is also member of pdupre I tried also %pdupre localhost=/usr/bin/mount /dev/mapper/VolGrpUsr_DK0-home /mnt/USB/)
What does the "hostname" command give you? I would suggest using "ALL" instead.
But it does not work /usr/bin/mount /dev/mapper/VolGrpUsr_DK0-home /mnt/USB mount: only root can do that
The sudoers file doesn't affect trying to run commands directly.
sudo /usr/bin/mount /dev/mapper/VolGrpUsr_DK0-home /mnt/USB [sudo] password for pdupre: pdupre is not allowed to run sudo on Teucidide. This incident will be reported.
I also tried to put pdupre as member of wheel, but it does not help.
You need to start a new shell after doing that. Use the "id" command to verify the group is set correctly.
I would also suggest adding a file to /etc/sudoers.d instead of modifying the default /etc/sudoers file.