Users and Groups

Mikkel L. Ellertson mikkel at infinity-ltd.com
Sat Dec 8 00:15:29 UTC 2007


Michael A Peters wrote:
> 
> Did you ask how to do that?
> I have a file called
> 
> /etc/security/console.perms.d/51-custom.perms
> 
> It contains the following:
> # device classes -- these are shell-style globs
> <garmin>=/dev/ttyS0
> 
> # permission definitions
> <console> 0600 <garmin> 0660 root.uucp
> 
> 
> 
> I wrote the file because I have a garmin gps that uses the serial
> port, /dev/ttyS0
> 
> With that file in place, I do not need to do something dangerous like
> add my user to the uucp group.
> 
> I wish there was a gui tool to set that kind of thing up, though to be
> honest, there are very few device nodes for which you ever need to set
> that kind of thing up.
> 
I tend to get slightly more complicated then that, because I have
more then one device that looks like a USB serial port. So I have a
udev rule to create a symlink specific to the device, and then have
console.perms trigger on the symlink instead of the device. For an
example, take a look at the udev rules that are part of the gpsd
package. I suspect something like this would work:

SUBSYSTEM=="tty", SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003",
SYMLINK="gps%n"

You would then use "<garmin>=/dev/gps*" instead of
"<garmin>=/dev/ttyS0". That way, it covers the case where you have
more then one GPS device connected.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071207/5a0d820a/attachment-0001.sig>


More information about the fedora-list mailing list