Udev and fstab - beginners question

Matias Feliciano feliciano.matias at free.fr
Sun Oct 3 18:57:29 UTC 2004


Le sam 02/10/2004 à 20:01, malcolm a écrit :
> Since this is my home PC I want anyone to be able to mount usb-mp3
> players, DVDs, CDRW etc. I used to do this by just bunging 'users' in
> the fstab options. Now something ( udev or whatever )  overwrites it on
> every boot and then I get the message 'only root can mount etc etc' -
> How do I make it so that everyone and their dog can mount anything. 
> 

Seems hal have solved you problem.

Anyway, I found some problems with udev.

Example :
my rules :
BUS="ide", KERNEL="hd*", RESULT="CREATIVE DVD-ROM DVD1243E", NAME="%k", SYMLINK="dvdrom dvd cdrom%e"
BUS="ide", KERNEL="hd*", RESULT="SAMSUNG CD-R/RW SW-240B", NAME="%k", SYMLINK="cdrw cdrom%e"

I have ide-cd as module.

# modprobe ide-cd
From /var/log/message :
blabla 
Oct  3 20:32:37 localhost udev: creating device node '/dev/hdb'
Oct  3 20:32:37 localhost udev: creating device node '/dev/hdd'

# ll /dev/hdb /dev/hdd
brw-r-----  1 root disk  3, 64 oct  3 20:32 /dev/hdb
brw-r-----  1 root disk 22, 64 oct  3 20:32 /dev/hdd

Yes, root and not the current user as expected.

This is because /etc/dev.d/pam_console.dev is not correctly call.
from /var/log/secure (you should adapt you syslog.conf):
Oct  3 20:32:37 localhost pam_console.dev: Restoring console permissions for /dev/hdb /dev/dvdrom dvd cdrom
Oct  3 20:32:37 localhost pam_console.dev: Restoring console permissions for /dev/hdd /dev/cdrw cdrom

Should be "/dev/hdb /dev/dvdrom /dev/dvd /dev/cdrom" and not "/dev/hdb
/dev/dvdrom dvd cdrom" AFAIK.

pam_console_setowner is called two time for each device :
pam_concole_setowner /dev/hdb 
nice but there is no rule in /etc/security/console.perms for /dev/hdb.
pam_console_setowner "/dev/dvdrom dvd cdrom"
Note the ". The file "/dev/dvdrom dvd cdrom" does not exist and there is
no rule for it in /etc/security/console.perms .

Also, we should expect two cdrom link.
# ll /dev/cdrom*
lrwxrwxrwx  1 root root 3 oct  3 20:32 /dev/cdrom -> hdd

Only one.
'%e' is not correctly handle when it is not used in the first symlink
name.

I try to fix this.
This is what I get now :
# modprobe ide-cd
from /var/log/secure :
Oct  3 20:48:19 localhost pam_console.dev: Restoring console permissions for /dev/hdd /dev/cdrw /dev/cdrom1
Oct  3 20:48:19 localhost pam_console.dev: Restoring console permissions for /dev/hdb /dev/dvdrom /dev/dvd /dev/cdrom

# ll /dev/hdb /dev/hdd
brw-------  1 test2 disk  3, 64 oct  3 20:48 /dev/hdb
brw-------  1 test2 disk 22, 64 oct  3 20:48 /dev/hdd

# ll /dev/cdrom*
lrwxrwxrwx  1 root root 3 oct  3 20:48 /dev/cdrom -> hdb
lrwxrwxrwx  1 root root 3 oct  3 20:48 /dev/cdrom1 -> hdd

Bugzilla :
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=134477
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=134478

The patchs are in bugzilla and here :
http://feliciano.matias.free.fr/udev/

> Ta
> 
> mal
> 
> FC3 Test 2 BTW 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message num?riquement sign?e.
URL: <http://listman.redhat.com/archives/fedora-test-list/attachments/20041003/bc94ffd6/attachment.sig>


More information about the fedora-test-list mailing list