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?

4
  • 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. Apr 27, 2010 at 2:36
  • how did you switch back to the other user? did you su <user>, su - user, or just logout form the root session?
    – warren
    Apr 27, 2010 at 2:53
  • 3
    Try becoming root and do a "history | more" and perhaps you'll be able to see what happened.
    – Chris Nava
    Apr 27, 2010 at 2:54
  • What are the rights on those files ? What is the value of your $PATH environment variable ?
    – slubman
    Apr 27, 2010 at 8:28

2 Answers 2

1

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

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?

You must log in to answer this question.