LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   modprobe command not found (http://www.linuxquestions.org/questions/linux-newbie-8/modprobe-command-not-found-929534/)

frumpus 02-15-2012 02:25 PM

modprobe command not found
 
I can't seem to access the modprobe command. 'man modprobe' works fine and the documentation is there, but when I try to use the modprobe command (even with 'sudo') the command is not found. Do I have to be in a particular directory or am I doing something else wrong?

This is RedHat 5.

Any suggestions would be appreciated. Thanks!

Didier Spaier 02-15-2012 02:33 PM

This a bit surprising - to my eyes at all.

You should be root to run modrobe, so type 'su -' first.

Then try to locate the modprobe commmand with 'which modprobe' (here it return /sbin/modprobe but it could be elsewhere for RedHat).

Once you'll have finded the location, use the full path of the command to launch it, e.g. '/sbin/modprobe', just in case the location wouldn't be in $PATH.

Last resort, if you really think you don't have that command, run (as root) 'updatedb' (takes a while), then 'locate modprobe' to check

edgardl 02-15-2012 02:34 PM

Hello, you could try to see where the command is, for example I obtained this

Code:

# which modprobe
# /sbin/modprobe

another way would be

Code:

# find / -name modprobe
probably you need to modify your $PATH

frumpus 02-15-2012 02:41 PM

Interesting. Running 'which modprobe' as root returns:

which: no modprobe in (/usr/bin:/bin)

I did find modprobe in /sbin though, that just doesn't seem to be in the path.

That's one problem solved. Thanks a bunch!

colucix 02-15-2012 02:52 PM

Quote:

Originally Posted by frumpus (Post 4603323)
Interesting. Running 'which modprobe' as root returns:

which: no modprobe in (/usr/bin:/bin)

I did find modprobe in /sbin though, that just doesn't seem to be in the path.

How did you switch to root? If using
Code:

su
alone, the current user's environment is preserved and the PATH environment variable is not updated. Instead, using
Code:

su -
the actual root's environment is set, since it acts as a login shell.

frumpus 02-15-2012 02:55 PM

When I try su - I am asked for the root password, which I do not have. I am in the sudoers file so I use 'sudo'. the '-' does not seem to work with sudo however.

frumpus 02-15-2012 02:56 PM

I was really hoping modprobe would solve my tape drive problem but no joy. Guess I get to start a new thread.

theW 02-15-2012 03:49 PM

If you are in the wheel group and the sudoers file than you do have permission to do this. The problem however is than sbin is not in your path. You can execute it anyway by doing something like
Code:

sudo exec /usr/sbin/modprobe
That should work for you.

John VV 02-15-2012 04:25 PM

Quote:

When I try su - I am asked for the root password, which I do not have
with out root access you do not
have your system administrator do it

also rhel DOSE NOT i repeat DOSE NOT !!! use "sudo" ( never did ) that us a mostly Debian / Ubuntu command

now sudo CAN be set up and often is but it is NOT set up by default


All times are GMT -5. The time now is 08:57 PM.