None of my bash commands work

1

I have an Ubuntu 9.10 netbook. It has always run great. Two days ago, I was running as root for a while (~30), and when I moved back to my user account (only other account on this machine), all the commands in ~/bin stopped working.

If I try ls, it comes up with "cannot execute binary file". Same with ln, mv, mkdir, clear, cp, etc. They all run as root (which makes sense, different files), but I have no idea why this happened. I don't want to stay as root to move around easily. Any idea?

Kevin

Posted 2010-04-27T02:16:16.700

Reputation:

Did you copy or install something? Or do something while logged in as root that might have allowed unauthorized access to your system that was able to copy or install something? As root, in Bash, try type -a ls then try it as your user and compare. Then do ls -bil $(type -afp ls) as each and compare. – Paused until further notice. – 2010-04-27T02:36:34.733

how did you switch back to the other user? did you su <user>, su - user, or just logout form the root session? – warren – 2010-04-27T02:53:38.230

3Try becoming root and do a "history | more" and perhaps you'll be able to see what happened. – Chris Nava – 2010-04-27T02:54:13.313

What are the rights on those files ?

What is the value of your $PATH environment variable ? – slubman – 2010-04-27T08:28:56.407

Answers

1

Check your path variable in your user profile. /bin should be there.

Octopus

Posted 2010-04-27T02:16:16.700

Reputation: 173

0

Are you saying you have a copy of your system commands in $HOME/bin? It sounds like a very weird idea. Anyway, "cannot execute binary file" can mean that the file in path is for wrong architecture. Is it a network share, or have you copied binaries from some other computer?

user36811

Posted 2010-04-27T02:16:16.700

Reputation: 119