[TriLUG] Problems with /etc/mtab

Janyne Kizer janyne_kizer at ncsu.edu
Mon Jan 27 08:40:55 EST 2003


Hmmm.  I removed the user from /mnt/floppy (owner was already there) and
then logged in via SSH as a regular user.  When I tried to mount the
drive, I got the following error:  "mount: only root can mount /dev/fd0
on /mnt/floppy."  When I put user back in /etc/fstab, I could once again
mount the device just fine as a regular user.  This isn't really what we
are looking for.  Typically there are 10-20 people on each linux system
(RH 7.2 at this point) logging on via x-terms.  If they would like to
use a floppy disk, they need to go to the server and insert it and then
mount it either from the server console or from their terminal.  

This is what the current /etc/fstab looks like.  

LABEL=/                 /                       ext3    defaults       
1 1
LABEL=/boot             /boot                   ext3    defaults       
1 2
none                    /dev/pts                devpts  gid=5,mode=620 
0 0
LABEL=/home     /home   ext3     exec,dev,suid,rw,usrquota,grpquota 1 2
none                    /proc                   proc    defaults       
0 0
none                    /dev/shm                tmpfs   defaults       
0 0
/dev/sda6               swap                    swap    defaults       
0 0
/dev/cdrom              /mnt/cdrom              iso9660
user,noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto   
user,noauto,owner,kudzu 0 0



Steven Blanchard wrote:
> 
> Janyne Kizer wrote:
> > I was wondering what would cause /etc/mtab to report that one device
> > (floppy) is mounted twice?  This has happened on one of our systems and
> > I was just wondering what on earth caused this.  Could this be caused by
> > trying to mount and bad floppy?
> >
> > Thsi is part of the file in question
> >
> > /dev/fd0 /floppy vfat rw,noexec,nosuid,nodev,user=userid1 0 0
> > /dev/fd0 /floppy vfat rw,noexec,nosuid,nodev,user=userid2 0 0
> >
> > /proc/mounts lists the device once:
> >
> > /dev/fd0 /mnt/floppy vfat rw,nosuid,nodev,noexec 0 0
> >
> > One of the people who uses that system has reported the following error
> > message:
> >
> > umount: it seems /floppy is mounted multiple times
> >
> > Any ideas?  Inquiring minds want to know :-)
> >
> 
> It looks like /etc/fstab mount the floppy with the user option. I bet
> user1 mounted a floppy, and removed it without unmounting it. user2
> mounted his/her floppy, but cant unmount it because only the user who
> mounted the floppy can unmount it. Since mount can not tell who that
> was, it wont allow either user to unmount the floppy. The floppy can
> probabally be unmounted as root.
> 
> My understanding is that instead of using the user option is /etc/fstab,
> you could use the owner option (which redhat uses). When the owner
> option is used, /etc/security/console.perms must set the owner of
> /dev/fd0 to whomever is logged in on the console. That may solve the
> problem.
> 
> _______________________________________________
> TriLUG mailing list
>     http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ:
>     http://www.trilug.org/~lovelace/faq/TriLUG-faq.html

-- 

Janyne Kizer
Systems Programmer Administrator
NC State University, College of Agriculture & Life Sciences
Extension Information Technology



More information about the TriLUG mailing list