PDA

View Full Version : modprobe and lsmod



Sipper
30th April 2006, 05:33 PM
Hi Guys

I'm not sure if I'm being dim here but, what do I need to do to use lsmod and modprobe? I've tried using them as su but get a message that 'modprobe cannot be found'. I know they are in /sbin but even changing directory to /bin does not help.

I'm new to Fedora and suspect this is a Fedora specific problem.

Many thanks

Sipper

Firewing1
30th April 2006, 05:49 PM
It's not Fedora specific - It's a smart security feature.
Every user has a $PATH variable set when you login. Because you're not root, /usr/sbin and /sbin are not in your $PATH, meaning that the system won't search there for commands. The result is that even though it's on your system, you can't execure it without manually typing:
/usr/sbin/command
or
/sbin/command
Even when you do, it will give you errors because you're not root.
Instead if doing
suto become root, try:
su -
That will reset $PATH to root's, allowing easy access to the "modprobe" and such commands without having to type /sbin/modprobe all the time as you would have to do with su only.
Firewing1

Sipper
30th April 2006, 06:00 PM
Many thanks, thats exactly what was needed.

Sipper