LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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.

Notices


Reply
  Search this Thread
Old 07-25-2003, 02:54 PM   #1
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Rep: Reputation: 32
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.

DAVE
 
Old 07-25-2003, 04:10 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Hi davecs!!!

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:

/etc/rd.d

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:

modprobe joydev

Let me know if it works please.

Good luck
 
Old 07-25-2003, 10:28 PM   #3
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
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.
 
Old 07-26-2003, 12:22 AM   #4
beaucoup
Member
 
Registered: Jun 2003
Location: Florence, SC
Distribution: Gentoo i386
Posts: 180

Rep: Reputation: 30
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.
 
Old 07-26-2003, 07:50 AM   #5
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32
Quote:
Originally posted by Megaman X

I usually edit the file called "rc.local". ... I simply added this line for it:

modprobe joydev

Let me know if it works please.

Good luck
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.

Quote:
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.

Quote:
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!

DAVE
 
Old 07-26-2003, 07:59 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Hi!

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 ):
groupadd firewire
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:
Code:
#!/bin/bash
/sbin/modprobe ohci1394
/sbin/modprobe raw1394
/usr/bin/kino
Of course modifying paths for actual application locations. Then, save and call it something like:
firewire-edit
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.

Cool
 
Old 07-26-2003, 03:28 PM   #7
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32
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...

DAVE
 
Old 07-26-2003, 05:36 PM   #8
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32
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!

DAVE
 
Old 07-26-2003, 06:53 PM   #9
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32
I DID IT!!!! I DID IT!!!!

Sorry for shouting, but.... I DID IT!!!!

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

cd /dev
ls

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

and rebooted.

I then went back to the /dev folder in a terminal as root and typed:

ls

dv1394 and raw1394 were now there, highlighted as before!

I typed:

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!

DAVE
 
Old 07-26-2003, 11:34 PM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Congratulations!

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
all users have access to root owned files sakatola Linux - Security 2 07-22-2005 12:45 AM
How to allow modem access to non-root users tadelste JDS 0 10-19-2004 04:39 PM
users other than root can not access internet ? summerfish Linux - Networking 4 07-17-2004 08:03 PM
only root users can access vnc server dlm4444 Linux - Newbie 1 05-01-2004 02:47 PM
non-root users inet access Duckus Linux - Newbie 4 06-05-2003 10:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration