Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Unable To Run Commands Any More, Get "command not found" Even with Root
jashall
post Oct 27 2003, 03:54 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 23-October 03
Member No.: 1,683



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?
Go to the top of the page
 
+Quote Post
Corey
post Oct 28 2003, 01:19 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 1,254
Joined: 21-September 02
From: St John's, Newfoundland, Canada
Member No.: 3



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]


--------------------
Corey Quilliam
(former) Linuxhelp.ca Administrator
cquilliam-AT-gmail-dot-com

Want to help out Linuxhelp.net? Check out our Linuxhelp Wiki and see if there are some articles you would like to submit!!

--
Ubuntu 8.04 64-bit - Work Laptop (HP-Compaq NC6400 Core2)
Kubuntu 8.04 64-bit - Desktop (HP m8120n QuadCore)
Ubuntu 6.04 - Server (I'm not upgrading this baby until support runs out in 2012) (Some old POS dell)
Go to the top of the page
 
+Quote Post
jashall
post Oct 28 2003, 05:26 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 23-October 03
Member No.: 1,683



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
Go to the top of the page
 
+Quote Post
hughesjr
post Oct 28 2003, 08:50 AM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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).
---------------------------------------------


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
jashall
post Oct 29 2003, 04:29 AM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 23-October 03
Member No.: 1,683



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)
Go to the top of the page
 
+Quote Post
jashall
post Oct 30 2003, 04:12 PM
Post #6


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 23-October 03
Member No.: 1,683



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!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2017 - 03:40 PM