Link to home
Start Free TrialLog in
Avatar of Jerryleo
Jerryleo

asked on

How to enable unprivileged user mount and unmount removable devices

I need to allow unprivileged users to mount/unmount following removable devices  on FC 3 box,

     1.CD-ROM
     2. PCMCIA CF cards
     3.USB drives

And eanble unprivileged users to excute cardctl with all commands not only informational commands, such as cardctl eject.

Your help appreciated

Thanks
Avatar of rid
rid
Flag of Sierra Leone image

Normally that could be achieved with a notation in the fstab file, in the fourth column, I believe. Insert "users" (or possibly "user") after "noauto" (if that comment is there) with a comma between the words. All this on the line for the device you are dealing with.
/RID
Avatar of Dragon_Krome
Dragon_Krome

You could also use the pmount tool

http://packages.debian.org/unstable/utils/pmount
I think he want either :

/dev/hdd3 /mnt/foo ext3 users
/dev/hdd3 /mnt/foo ext3 user

First oneallow any user to unmount a usermount filesystem and second allow only the userwhomounted it to umount it.

This is dure good for cdrooms and usb drives, not sure for pcmcia, i don t own one
Here's how mine is setup:

For CDROM
/dev/hdc         /mnt/cdrom       auto        noauto,user,ro   0   0

For USB
/dev/sda1        /external        auto        noauto,user      0   0

You will need to change the drive letter (/dev/hdc or /dev/sda1) to whichever number or letter is appropriate for your machine.  By leaving the filesystem type to "auto", the system will autodetect what the drive is formatted as, and should load it automatically.  If you did something like this, make sure to create the /external directory for this to work.

I'm still researching the question on the PCMCIA CF.  Some of the stuff I'm finding suggests it loads as /dev/hde#, but that doesn't make much sense to me.

Regards,

D
Avatar of Jerryleo

ASKER

Thanks for all kind help

pmout requirements hal >= 0.5.2 hal-storage >= 0.5.2.  My box doesn't fit the requirements. I have to upgrade a lot of componets, and it's too complex to do it for me.

There is no static entries for removalbe devices in fstab.  fstab-sync updates fstab  and  create/remove mount points in /media in response to HAL events.  The default  policy for CDROM and USB work fine.  Now I  just need to add/modify the default policy for PCMCIA CF  card. I check man page for fstab-sync. But I still have no idea how to add/modify the default policy for PCMCIA CF  card.

Does anyone can tell me how to do it?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Dragon_Krome
Dragon_Krome

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial