Timeline for Can't execute any commands in bash except as sudo
Current License: CC BY-SA 3.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 19, 2012 at 2:52 | comment | added | Paul |
Can you try sudo mv /home/otis/bin /home/otis/bin.old . This will rename the directory, which will then allow the proper binaries in /bin to execute.
|
|
Dec 19, 2012 at 1:16 | history | edited | Wyzard |
edited tags
|
|
Dec 18, 2012 at 23:50 | comment | added | otis | I own everything. The user is me and so is the group. | |
Dec 18, 2012 at 23:45 | comment | added | glenn jackman |
Who owns the binaries in your bin directory? Show us the output of ls -l /home/otis/bin
|
|
Dec 18, 2012 at 23:19 | comment | added | Scott - Слава Україні |
Wow. If cd , echo , and set don’t work, you may need to throw away your computer and buy a new one. :-)
|
|
Dec 18, 2012 at 23:09 | comment | added | otis | I didn't put them there and I am the only one that uses this computer. How could this have happened and what should i do to secure it now. Do I wipe it out and start all over. | |
Dec 18, 2012 at 23:05 | comment | added | otis | Yes I have logged in and out. Yes there is a /home otis/bin directory with those files.. don't know how or why. No built in commands only work as sudo. My path looks like this: bash: /home/otis/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/lib/jvm/jdk1.7.0/bin: No such file or directory | |
Dec 18, 2012 at 23:03 | comment | added | Paul |
Otis, just to re-iterate what has been said, if you haven't created a bin folder in your home directory and populated it with these binaries, and modified your path, then something has gone seriously wrong. One of the possibilities is that your system has been compromised. If you haven't done these things yourself, then stop trying to fix things and let us help investigate - you may be trying to run binaries that were put there maliciously.
|
|
Dec 18, 2012 at 22:54 | comment | added | Scott - Слава Україні |
So many questions to ask. (1) Have you tried logging out and logging in again? (2) Do you really have files in your private bin directory (/home/otis/bin ) with the names ls , cp , etc…? (2½) Why? (2⅔) What are they? (3) Do shell built-in commands like cd , echo , and set still work? (4) What is your PATH environment variable set to? (Either type echo $PATH or type set and look for a line beginning PATH= .) (4½) Why?
|
|
Dec 18, 2012 at 22:53 | comment | added | user55325 |
Unless you have a good reason for having system binaries in your home directory, it looks like you messed up your PATH. It should look something like /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
|
|
Dec 18, 2012 at 22:53 | answer | added | To Do | timeline score: 2 | |
Dec 18, 2012 at 22:53 | review | First posts | |||
Dec 19, 2012 at 0:21 | |||||
Dec 18, 2012 at 22:40 | comment | added | Nicole Hamilton |
What do you see in the rwx bits if you ls -l these binaries?
|
|
Dec 18, 2012 at 22:37 | history | asked | otis | CC BY-SA 3.0 |