I have a C program that talks to the /dev/ttyUSB# ports. I am sure I have in the past circumvented PAM and UDEV type authorizations incorrectly to let a user (non-root) let my program work with these devices. What is an acceptable way of doing this?
In my software all I do is ask for a file descriptor as in,
int myFD = Open_port("/dev/ttyUSB0");
if (myFD >= 0)
//elided work code
Works fine as root or when I muck about with /etc/udev/permissions.d/ which doesn’t seem to exist anymore.
There also used to be a “hotplug” group that I could let a user be part of that would work (maybe a Ubuntu thing)
Things seem to have changed or maybe I haven’t kept up with all the security stuff. What is the new method to do this in openSuse?
You need to add a udev rule see down in /etc/udev/rules.d/ for
examples. Try adding it at the end of the list first with a filename of
99-mydevice. You need the id numbers of the usb-serial device from
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 x86 Kernel 184.108.40.206-9-default
up 1 day 20:59, 2 users, load average: 0.13, 0.24, 0.31
GPU GeForce 6600 TE/6200 TE - Driver Version: 180.29
The uucp group worked and having played with udev rules in the past I’m sure that would work as well. The udev method puts the access authorization point at the device whereas the uucp group method puts the authorization point at a user level. For device control like this is the udev method preferred?