Find the answer to your Linux question:
Results 1 to 4 of 4
Hi I have a problem with one of my device drivers under Redhat server. the problem is that i can only insmod my driver as root, the driver loads as ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    2

    installing driver w/ user privileges


    Hi

    I have a problem with one of my device drivers under Redhat server.

    the problem is that i can only insmod my driver as root, the driver loads as root, and therefore requires root privileges for access. As a result i am unable to access the device from any programs having only user privileges. The easiest way to solve the problem is to chown the device file in /dev, but i want it to be inserted with having user privileges...

    I've heard that there is a script, which OS runs when the driver is installed to assign its privileges. I wish i had a way to install the driver such that it loads on boot, has user access rights, and can be executed by a user group of my choice (not root).

    thanks a lot for your help guys.

  2. #2
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    Well, I have not a RedHat AS here.... but in /etc/sysconfig/network-scripts there are a set of scripts called ifcfg-eth0 efcfg-eth1 and so on... (if I remember..)
    Edit the one you want and you will see a line like this:

    USRCTL="no"

    Change for "yes"

    You can do this via the gnome application provided by Red Hat (redhat-network-config???). I think I've seen an "Allow users to bring the interface up" checkbox. This second way is safer than the first one I explained.

    Best regards

  3. #3
    Just Joined!
    Join Date
    Apr 2006
    Posts
    2
    thanks for your reply,

    The thing is that the device and its driver are custom, what you refer to seems to be network device cofiguration...
    the ultimate goal is prepare a distribution of the driver so that the user doesnt have to be logged in as root to access the device or to use any software which needs the device. After all, things like sound and video drivers are installed with user privileges and work for anyone. Also, i would not like the idea of opening up userr access to all devices in /dev... for security reasons.
    What would be great to figure is a script of some sort which assigns privileges upon driver module insertion... its gotta be somewhere in the OS... i just dont see it yet.

    any replies are appreciated!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301

    Slept

    Sorry I think I was slept in my previous post... you didn't say anything about network devices

    Maybe you could try to write a C wrapper program and then set the effective user id although it is not recommended, there are still programs that use this feature.

    Best regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •