Recent Linux distributions are using udev to manage devices on the computer. Usually, only root is allowed to directly access certain hardware. This becomes a problem when normal users need to access printers etc. that are directly attached to the computer.

Editing the udev rules allows you to set user permissions during boot allowing normal users to print hassle free.

On Debian, udev settings are stored in /etc/udev/rules.d . These rules need to be named properly to work:   NN-rulename.rules ( where NN is a number, user rules usually are < 60 )

Debian also uses udevadm instead of udevinfo to retrieve device information needed to build the rulesets.

ex.
sudo udevadm info –query=all –name=ttyS0 –attribute-walk

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device ‘/devices/pnp0/00:06/tty/ttyS0′:
KERNEL==”ttyS0″
SUBSYSTEM==”tty”
DRIVER==”"

looking at parent device ‘/devices/pnp0/00:06′:
KERNELS==”00:06″
SUBSYSTEMS==”pnp”
DRIVERS==”serial”
ATTRS{id}==”PNP0501″

looking at parent device ‘/devices/pnp0′:
KERNELS==”pnp0″
SUBSYSTEMS==”"
DRIVERS==”"

Details for rule writing can be found here:

Writing udev rules.

Be Sociable, Share!

Subscribe to comments Comment | Trackback |
Post Tags:

Browse Timeline


Add a Comment


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*

Powered by WP Hashcash


© Copyright 2007 KafeKafe . Thanks for visiting!