How do I enable modules so that non-root users can access them?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
How do I enable modules so that non-root users can access them?
I've put this in the "Software" section but I don't really know where it should go.
I am running Mandrake 9.1. My mobo is Asus A7N266VM and on it I have a PCI Host controller for ieee1394 (firewire). I thought I had a hardware problem in that I thought I could not get it to work, but I think this is a software problem.
After loading the following modules using modprobe:
video1394, ohci1394, ieee1394, dv1394 and raw1394
I can access the 1394 system as root, but not as "ordinary user". Is there another way of loading them so they are accessible to the system?
I have tried using Mandrake Control Centre to set up the hardware, but when I press the configure button the module freezes and I have to use brute force to exit it.
For the time being I will add the modprobe lines to 'rc.init', and modify the 'kino' icon so it prompts for root password, but I would rather not do the latter, so if anyone can help I would be most grateful.
To activate modules at start up, without need to su - or login as root, you have to add the modules you want to autoload at:
I usually edit the file called "rc.local", but it may differs into your system. Anyway, check there first.
At the end of this file, for example, I have my joystick module set to auto load. I simply added this line for it:
I'm curious, as there must be a host of other modules loaded at boot time that non-root users have "access" to. When you say you can access the 1394 system as root, what exactly does that entail? I'm theorizing that perhaps it's the access method that needs examination for permissions as opposed to the kernel modules.
Originally posted by Megaman X
I usually edit the file called "rc.local". ... I simply added this line for it:
Let me know if it works please.
Sorry in my original post I typed rc.init when I meant rc.local - I have put all the modprobes at the end of rc.local and I can still only access the 1394 subsystem as root.
Originally posted by akaBeaVis When you say you can access the 1394 system as root, what exactly does that entail?
I run a terminal in KDE, type "su" and password, then type "kino" from the command line. Kino then accesses the 1394 system and works perfectly. However if I just click the kino icon or run kino in the terminal without changing first to root, I cannot access the 1394 system. This applies equally to kino, dvgrab, testlibraw and gscanbus.
The ieee1394 host adaptor is not automatically detected at startup. It was when I upgraded the Mandrake kernel to 2.4.21-0.18, but then the network connection went to pot (yes I did load the nForce driver correctly). But still I could not access the ieee1394 system as a normal user.
Originally posted by beaucoup What sort of 1394 device are you trying to use? If you're talking about mounting a 1394 hard disk, then it may just be a matter of adding the "user" parameter to that drive's entry in /etc/fstab.
The PCI host adaptor is a Kouwell K582V2 and I have a DV camcorder connected to it (JVC GRD 40E). I selected both items because they were said to be compatible at www.linux1394.org. As this is not a drive, I assume it would not be possible to do anything on fstab.
I have posted to the linux1394 help board about this but I have not seen a single query that has had a reply there! So I don't suppose mine will fare any better!
How's about adding a plethora of operations to own the device... Give this a run and see how you do (or rather, how it does ):
usermod -G firewire username
chown root.firewire /dev/raw1394 (or whatever your 1394 device is, I cannot remember off the top of my head)
chmod 770 /dev/raw/1394 (again, same device(s) )
And then fire up kino and see. If it is truly a lack of module loading, try creating a script and launch the script from a desktop icon instead, the script might look something like:
Of course modifying paths for actual application locations. Then, save and call it something like:
Place it in your $PATH:
cp firewire-edit /usr/local/bin/firewire-edit
chmod 755 /usr/local/bin/firewire-edit
chown root.firewire /usr/local/bin/firewire-edit (root.firewire since they are the only ones who can use the device anyway )
And then launch the puppy and see what happens.
Good Luck, and I'm doin it all from memory, so I appologize for any grossly obvious mistakes.
Thanks for trying, MasterC, but the brick wall is still there.
I have two 1394 devices under /dev, they are /dev/ieee1394 and /dev/video1394.
I tried everything you said in your post, and further, I opened a "File Manager" as root, and checked every single permission box under both these devices. Guess what? No change at all.
Kino (and the script firewire-edit) only recognise the ieee1394 subsystem if I run them as root. I add all the modprobes to the script, no change at all.
There are a couple of things that worry me here: surely there should be devices for each of the drivers: ie /dev/dv1394, /dev/raw1394 and /dev/ohci1394, or maybe not! Kino certainly seems to expect to find the first two of these. All the devices I have have been created for me by Mandrake on a plug and pray basis, but nothing happens for the 1394 stuff. As kino expects the input device to be /dev/dv1394, I tried adding to modules.conf: alias /dev/dv1394* dv1394. Guess what? That did absolutely nothing!
Back later I'm going to try something else which involves a restart...
I have been having a good look around the net, and I think that I should have a device /dev/raw1394 linking to the raw1394.o module. For some reason I don't. It might be down to mandrake 9.1 or it might be down to the fact that I have an nVidia based mobo.
How can I create the device and link it manually to the module? Is there another command (than modprobe) or a line in modules.conf that I can use to load the relevant modules and create the device? I think if I can do this, I could then ensure it gives access to non-root users. You never know!
I already had all the modprobe lines added to rc.local and the devices only worked for root.
In a terminal I changed to root and typed
I saw that there were some reversed entries (ie highlighted) which did not correspond with directories listed in Konqueror. One was /dev/nvidia. There is a line in /etc/modules.conf which reads alias /dev/nvidia* nvidia . I concluded that they were "virtual" devices and wondered whether I could "chmod" them as if they were real ones.
So I added these lines to modules.conf
alias /dev/dv1394* dv1394
alias /dev/raw1394* raw1394
I then went back to the /dev folder in a terminal as root and typed:
dv1394 and raw1394 were now there, highlighted as before!
mknod raw1394 c 172 0
mknod dv1394 c 172 0
Both these lines produced errors, directories already present, but I continued:
chmod 666 raw1394
chmod 666 dv1394
Now I ran kino as user from the menu and it ran with full access to the 1394 system.
To find out whether the change was permanent, I took a deep breath, rebooted (I nearly suffocated - it takes a while!) and ran kino again, and it worked!
Anyway, thanks everyone for trying. I'm about to log off and get the partition image discs out... time for a backup, methinks!