Help - Search - Members - Calendar
Full Version: Unable To Run Commands Any More
Linuxhelp > Support > Technical Support
Everything worked great with my Linux box (Mandrake 9.1) until I was trying to get Samba to work. Now, from terminal window under regular or root userid I get command not found when trying to run any commands. I cannot even use the command "shutdown." I can go to a directory, list all the files, even copy/paste a command from within the directory and it tells me it is not found. I also shut down all the Samba processes (I think) since that is the last thing I was working on prior to this trouble.

I did everything recommended under the forum "Gasp! Root Can't Change Permissions!"

Any other suggestions?
Log in as your root user, and issue the following command:

user@host:# echo $PATH

Please reply with what the console spits back.

As well, attempt to run these so-called "missing" programs but explicitly naming them on the command line, for example:

user@host:# /sbin/shutdown --help

If the above command actually shows you the help for shutdown, then the problem is simply that you don't have your PATH setup correctly.

The following is the export of the PATH variable for root on my Debian GNU/Linux system so you can compare:

gateway:~# echo $PATH
Here is my $PATH

[root@localhost arrakis]# echo $PATH

If I type /sbin/shudown --help I do get the help for shutdown. I'm not sure what is wrong in my path. Any suggestions?

Thanks for your help
Your $PATH looks OK ... type the commands
/usr/bin/which ls
/usr/bin/which shutdown
/usr/bin/which cp
/usr/bin/which which

Then try the commands
which ls
which shutdown
which cp
which which

Do either of them work?

Did you do anything in the directory /etc/pam.d with the file login as part of the samba stuff?

what is the output of this command (as root):


It should at least be this:
uid=0(root) gid=0(root) groups=0(root)

(there might be some other groups).
O.k. I typed everything in from the prev post.

Everything works under the root user.

I don't know if i did anything in the /etc/pam.d during working with Samba as I used the mandrake install gui

Here is the output
[root@localhost arrakis]# /usr/bin/which ls
[root@localhost arriakis}# /usr/bin/which shutdown
[root@localhost arrakis]# /usr/bin/which cp
[root@localhost arrakis]# /usr/bin/which which
[root@localhost arrakis]# which ls
[root@localhost arrakis]# which shutdown
[root@localhost arrakis]# which cp
[root@localhost arrakis]# which which
[root@localhost arrakis]# id
uid=0(root) gid=0(root) groups=0(root)
Hummm.... I took the easy path to the Dark Side.

I booted off of my Mandrake install CD. It had me re-select my settings. It did not seem to re-install anything, just ask for the settings again.

Pulled the CD out, restarted.... And everything works.

One day I'll have to read further in to what I could have possibly messed up.

Anyway, thanks all for your help. I learned some!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.