On Tue, 11 Sep 2012 22:47:21 -0400, Walter Dnes wrote: > Fully agree that's a bad idea. My system uses sudoers. I.e. in > /etc/sudoers.d/001 I have the lines... > > user2 d531 = (root) NOPASSWD: /usr/local/bin/ux * > waltdnes d531 = (root) NOPASSWD: /usr/local/bin/ux * > > ...where /usr/local/bin/ux consists of... > > #!/bin/busybox ash > pumount ${1} > > ...and in my home directory I have ~/bin/um which consists of... > > #! /bin/busybox ash > sudo /usr/local/bin/ux ${1} > > ...So I can, as a regular user, execute at the commandline... > > um sdb1 > > ...and /media/sdb1 is unmounted. No need to log on as root or have a > root shell.
I don't understand, why are you using sudo to run pmount when its core purpose is to be run by normal users? % whatis pmount pmount (1) - mount arbitrary hotpluggable devices as normal user -- Neil Bothwick Life's a cache, and then you flush...
signature.asc
Description: PGP signature