Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 07-20-2005, 08:32 AM   #1
Luis Nunes
LQ Newbie
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
RHEL3 Mounting USB after reboot and between reboots: root and non-root users

Question: How to keep /etc/fstab between reboots for non-root users to mount USB?

My RHEL3 on reboot calls /etc/init.d/kudzu start, by which it then calls /usr/sbin/updfstab.
The result in /etc/fstab is (I'll just copy the detected kudzu marked devices:

/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/sda1 /mnt/flash auto noauto,owner,kudzu 0 0

Because: "users" is not added to /dev/sda1 on boot, only the device owner (root) mounts USB. I want non-root users to mount USB pens and not have this result:
$ mount /dev/sda1 /mnt/flash
mount: only root can do that
$ mount /dev/sda /mnt/flash
mount: only root can do that

Note: root user can mount /mnt/flash with sda (partition 0), not with sda1
$ mount -t vfat /dev/sda1 /mnt/flash
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
or too many mounted file systems
$ mount /dev/sda /mnt/flash
- /etc/mtab shows
/dev/sda /mnt/flash vfat rw 0 0

Does seem an issue with /dev/sda1, I don't know, proceeding with analysis.

So, I tried Manual update to /etc/fstab, knowing the changes/added entries will be gone on reboot. I tried adding "users"
/dev/sda1 /mnt/flash auto noauto,users,owner,kudzu 0 0
$ mount /dev/sda1 /mnt/flash
$ mount /dev/sda /mnt/flash
Still get the "only root" message.

Note: root user can mount /mnt/flash with sda (partition 0)
$ mount /dev/sda /mnt/flash
- /etc/mtab shows
/dev/sda /mnt/flash vfat rw 0 0

So, I tried mounting the Floppy (similar fstab entry, looking for pattern) with a non root user.
$ mount /dev/fd0 /mnt/floppy
Still get the "only root" message. So same pattern here.

So, I tried something else with Floppy, still with non root user:
$ mount /mnt/floppy
Hay, I'ts mounted - /etc/mtab:
/dev/fd0 /mnt/floppy vfat rw,nosuid,nodev,user=oracle 0 0

Ok, now tried same thing with USB:
$ mount /mnt/flash
mount: I could not determine the filesystem type, and none was specified
$ mount -t auto /mnt/flash
mount: only root can do that
$ mount -t vfat /mnt/flash
mount: only root can do that

Grrrr! So, I tried as suggested from my Flash doc for unix mount:
- mkdir /mnt/USB
- edit /fstab using /dev/sda (paritition 0, and not sda1), had to ajust and add "users"
/dev/sda /mnt/USB auto noauto,users,owner,kudzu 0 0
Pretty much the some thing as for /mnt/flash, huh!

$ mount /mnt/USB
Voal´┐Ż, mounted - /etc/mtab shows:
/dev/sda on /mnt/USB type vfat (rw,noexec,nosuid,nodev)

So, back t the top question - see above.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting a fat drive for non-root users sadarax Linux - Hardware 2 05-17-2006 02:51 AM
Mounting USB Thumbdrive as non-root? ernestteo Linux - Hardware 6 12-24-2004 09:49 AM
How to allow certain non-root users to reboot?? jdaniel Linux - General 2 09-06-2004 10:05 AM
Mounting NTFS for users other than root Tarwedge Slackware 19 05-20-2004 02:59 PM
users other than root mounting drives general4172 Linux - Hardware 2 09-23-2003 08:02 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration