Jump to content

usb sidewinder only works as root


miemens
 Share

Recommended Posts

I have a usb ms sidewinder and it will only work if I'm running as root.... I've added joydev,hid, and sidewinder to my modules.conf. It's always worked before in older versions of mandrake. Anyone have any advice? I'm tired of having to su to run gnomeboyadvance :P

Link to comment
Share on other sites

First of al, sidewinder is a fairly large product line. What sidewinder ware you talking about?

 

Then, what kernel?

 

What version fo mandrake?

 

How many updates have you installed?

 

What other USB devices do you have installed?

Link to comment
Share on other sites

  • 5 months later...

I have had this same problem, with Fedora core 2, which is why I switched to Mandrake 10.1 beta.

Now I have mandrake 10.1 community and I'm faced with the problem again. My Joystick works fine under root, but nothing in other users. I do have a Logitech usb mouse that works fine for all users. Here are the specifics.

Sidewinder Precision Pro Joystick USB

Mandrake 10.1 community

Athalon xp 2200

Unreal Tournament 2004.

Link to comment
Share on other sites

  • 2 weeks later...

You must modify /etc/udev/permissions.d/00-udev.permissions in line 200:

 

#-------------------------------

# input devices

# security => input: 644 => 600

# else anybody logged on could read my password directly from the event device

# associated with the keyboard...

input/*:root:root:0644 <-- change 0600 by 0644

and it's work fine.

Link to comment
Share on other sites

Actually, it would be better to add an extra line underneath:

 

input/js*:root:root:0644

 

Technical info: Linux's devices system involves a directory called /dev which contains a file for each device attached to the system. Originally, this was 'static' - the files were created and deleted and changed 'manually' with mknod. You change the devices, you (or some hardware detection program included with your distribution) has to create new /dev entries. Most distros shipped with a laundry load of common ones to make sure most hardware works, which was ugly as hell. The old alternative to this was devfs. The newest one, which Mandrake now uses by default, is called udev.

 

udev is spiffy. It runs outside the kernel space and watches the kernel for hardware change notifications. udev creates a /dev tree with only the devices that actually make sense for the stuff in your system; when hardware is added or removed, udev sees this and adds or removes the appropriate /dev entries.

 

Obviously this whole thing is a bit of a black art, what with the vagaries of PC hardware configuration. The file in question here is one udev reads to let you tell it what permissions to use for some devices, if the ones it picks aren't good. The particular LINE in question:

 

input/*:root:root:0600

 

tells it that, whenever it creates a device in the /dev/input directory (that's the input/* part), it should be owned by user root and group root (the root:root part), with the permissions 0600 - that is, readable and writeable by the owner (root - this is the 6), with no permissions for either group or anyone else (the second number shows the permissions for the group, the third number the permissions for everyone else). The rationale for this is above; if anyone but root can read the file, that potentially allows one user on a system to monitor the keystrokes of another, as /dev/input contains the keyboard device file.

 

For your average home system this is no big deal, so the suggested fix is fine. It's just more elegant to use really good security, though, so if you add the line I suggested, the keyboard (and mouse, and anything else that isn't a joystick) devices will still get 0600 permissions, while joysticks *alone* will get 0644 permissions. This means root - the owner - can read and write, and the group (root) and everyone else can read but not write (this is what 4 means). So every user on the system can use the joystick, which is the point of the exercise.

 

An even more elegant option is this:

 

input/js*:root:games:0640

 

This would create all joystick devices owned by user root and group games, with root having full access, anyone in the 'games' group being able to read, and no-one else having any access. Then you can add any user who should be allowed to use the joystick to the games group, and leave any user who shouldn't be allowed to out of it. I just picked the name 'games' on the spot, as I'm not at a Mandrake box - there's a pre-existing group on Mandrake systems which is perfect, but I can't remember the name of it. This is the setup I use on my Mandrake box.

 

For a single-user desktop this is all overkill. But it's really useful to know, and it's a good way to understand the point of the permissions system and how it can be used on big systems with *lots* of users. Plus now you know what udev does!

Edited by adamw
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...