Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Installation - Getting started with Red Hat Linux
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
USB utilities

USB utilities

2005-03-28       - By Barry Gamblin

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

|>
|>
|> On Fri, 25 Mar 2005, Barry Gamblin wrote:
|> >
|> >>  What are the correct entries? My /etc/updfstab.conf looks like
this:
|> >>
|> >>  include /etc/updfstab.conf.default
|> >>
|> >>  device usbdrive {
|> >>  partition 1
|> >>  match   hd WDC
|> >>  }
|> >>
|> >>  And when I plug in the drive I get this in /etc/fstab:
|> >>
|> >>  /dev/sda1      /mnt/usbdrive      auto    noauto,owner,kudzu 0 0
|> >>
|> >>  But a normal user cannot mount /mnt/usbdrive. It says that only
|> >>  the superuser can mount.
|> >
|> > Stephen Gardner wrote:
|> >
|> > I think you may have found a bug with updfstab or one of the other
hotplug
|> > associated tools. If you delete the options you added to
/etc/updfstab.conf
|> > and just add the  "match   hd  WDC"  line to the "device flash"  
section in
|> > /etc/updfstab.conf.default  you should find it works as expected.
The section
|> > you added looks fine to me and I've just tested something similar
but the
|> > underlying problem (the cause of the message you're getting) is
that
|> > /dev/sda1  isn't being set to be owned by the console user. When
the "match"
|> > line is part of the "device flash" section in  
/etc/updfstab.conf.default
|> > then  /dev/sda1  gets set to the correct ownership to allow the
mount to
|> > work. Editing /etc/updfstab.conf.default  isn't a long term
solution but will
|> > get you going for now. I'll do some more digging with strace and
see if I can
|> > find the underlying cause.
|>
|> Just to clear up the underlying problem Barry had here.. well, if I
can
|> because it's complicated..
|>
|> The underlying problem is indeed that when a custom "device" entry is
|> added to  /etc/updfstab.conf(.default)  it won't get the correct
|> permissions assigned to the  /dev/<device>  device node without
additional
|> changes being make to  /etc/security/console.perms.
|>
|> [ this may all be in the archives somewhere and I've found a few
|> references on the web so feel free to ignore the explanation ]
|>
|> Using Barry's example, when the USB device gets plugged in
|> /usr/sbin/updfstab  modifies  /etc/fstab  correctly and makes the
|> directory  /mnt/usbdrive. However when  /usr/sbin/updfstab  calls
|> /sbin/pam_console_apply   it has no permissions rules for  
/mnt/usbdrive
|> (and therefore its associated  /dev/sda1  device) in
|> /etc/security/console.perms. The upshot of which is that the
permissions
|> don't get set correctly leaving  /dev/sda1  still owned by root and
|> unmountable by normal users.
|>
|> Making an addition to the existing "device flash" section in
|> /etc/updfstab.conf.default  ("match   hd WDC" in this case) means
Barry's
|> device will initiate the creation of  /mnt/flash  which *does* get a
match
|> in  /etc/security/console.perms  and  /dev/sda1  then gets its
ownership
|> changed.
|>
|> The conclusion to all of this is that if you modify  
/etc/updfstab.conf
|> to include a new "device" entry you'll need to modify
|> /etc/security/console.perms  as well if you want non-root users to be
able
|> to mount it.
|>
|> Barry, two things. Firstly RHEL3-U5 includes a replacement kudzu
package
|> which is likely to clobber your changes if you apply the new package
|> (although they'll get saved in the .rpmsave version of the file).
|> Secondly, if you bugzilla the details of the USB device (WDC) as an
|> enhancement to the kudzu packages  /etc/updfstab.conf.default  file
it
|> might make it in in time for U5.
|>
|> Regards,
|>          Stephen
|>

Thanks for the explanation! I'll look into the bugzilla report.

Barry

--
Taroon-list mailing list
Taroon-list@(protected)
http://www.redhat.com/mailman/listinfo/taroon-list

Earn $52 per hosting referral at Lunarpages.