Help - Search - Members - Calendar
Full Version: Unable To Run Commands Any More
Linuxhelp > Support > Technical Support
jashall
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?
Corey
Log in as your root user, and issue the following command:

[quote]
user@host:# echo $PATH
[/quote]

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:

[quote]
user@host:# /sbin/shutdown --help
[/quote]

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:

[quote]
gateway:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
gateway:~#
[/quote]
jashall
Here is my $PATH

[root@localhost arrakis]# echo $PATH
/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin

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
hughesjr
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):

id

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

(there might be some other groups).
---------------------------------------------
jashall
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
/bin/ls
[root@localhost arriakis}# /usr/bin/which shutdown
/sbin/shutdown
[root@localhost arrakis]# /usr/bin/which cp
/bin/cp
[root@localhost arrakis]# /usr/bin/which which
/usr/bin/which
[root@localhost arrakis]# which ls
/bin/ls
[root@localhost arrakis]# which shutdown
/sbin/shutdown
[root@localhost arrakis]# which cp
/bin/cp
[root@localhost arrakis]# which which
/usr/bin/which
[root@localhost arrakis]# id
uid=0(root) gid=0(root) groups=0(root)
jashall
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-2017 Invision Power Services, Inc.