  | |  | USB utilities | USB utilities 2005-03-23 - By Karl Latiss
Back On Thu, 2005-03-24 at 14:49, Stephen Gardner wrote: > On Wed, 23 Mar 2005, Akop Pogosian wrote: > > > I am often being asked is whether there exist utilities that allow > > users to mount USB storage devices without superuser's intervention. > > Does such thing exist on RHEL 3? What about RHEL 4? > > Akop, > This is certainly very easy under RHEL4 which uses a combination > of the hald process to detect the insertion of the USB storage device > and fstab-sync to create the appropriate line in fstab to enable the > device to be mounted by the user on console. RHEL4 has a /media directory > into which user mountable CDROM, USB storage etc mount points are > created. > > Under RHEL3 there are a couple of options I can think of. Firstly > a crude option is to attempt to minic the RHEL4 /media directory > with an entry in /etc/fstab something similar to > > /dev/sda /media/usbdevice auto user,noauto,unhide,sync 0 0 > [ change /dev/sda to suit your system, it's where my USB device ends up ] > > This doesn't always work as auto-detecting the filesystem can be > problematic. The "user" option allows a user to mount and unmount the > device. You can have problems with a user forgetting to unmount the device > and simply removing the storage device. Changing that option to "users" > will allow any user (not just the person who mounted it originally) to > mount and unmount the device (NOTE: if you allow remote logins this can > allow a remote user to unmount a local users filesystem). The "user"(s) > option sets some sensible security defaults, see mount(8) man pages for > more details. > > Secondly there's the automounter. A quick-and-dirty guide would be to have > a line in /etc/auto.master like > /media /etc/auto.media --timeout=120 > > Then create a file called /etc/auto.media containing > usbdevice -fstype=auto,nosuid,nodev,sync :/dev/sda > [ change /dev/sda to suit your system, it's where my USB device ends up ] > > Then when a user goes into the /media/usbdevice it'll get mounted > automatically. Plus after 2 minutes of inactivity the device will be > unmounted. autofs(5) is worth reading. > > One note of warning about all of the above is that if you plan to perform > an upgrade to RHEL4 from RHEL3 (rather than a clean install) and use some > of the above suggestions they will cause conflicts with the internal RHEL4 > functions. If that's a possibility avoid using the /media and choose > another location. > > Regards, > Stephen > All the above may be possible but as long as the right entries are in /etc/updfstab.conf.default (which was updated in U4 I think) it all "works for me". I added /mnt/flash to the diskmounter applet and can mount and unmount to my heart's content.
-- Karl Latiss <karl@(protected)> designIT
-- Taroon-list mailing list Taroon-list@(protected) http://www.redhat.com/mailman/listinfo/taroon-list
Earn $52 per hosting referral at Lunarpages.
|
|
 |