automount of usb stick to special directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is it possible to mount a usb stick/pen to a special directory while the
stick is recognized by it's filesystem label? I thought about using udev
like the following rule:

ENV{ID_FS_USAGE}="filesystem", ENV{ID_FS_LABEL}=="my_special_label",
ACTION=="add", RUN+="/bin/mount -L my_special_label /my_dst"

But that would when I have to adjust the SELinux policy for every
computer where I want to use that because udev is prevented to use the
mount command (which is absolutely right ;-)).

Another thought was about using HAL. But I need to mount the usb stick
even when no one is logged in. I'm not familiar with hal. Is it possible
to mount a storage device to a special directory with root rights? Even
when no user is logged in?

The scenario is to mount a usb stick which contains keys to mount an
encrypted filesystem. Therefor the usb stick has to be mounted to a
static directory (best would be inside /root directory). While a user is
logged in HAL shouldn't mount the usb stick e.g. to /media so that the
user could access that one (and possibly steal the keys). But the stick
should be also mounted while no one is logged in (because that device
holds the keys for the encrypted /home-partition).

Any ideas?

cheers,
Stefan


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux