LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? (http://www.linuxquestions.org/questions/linux-software-2/echo-%24path-%3D-home-g3rc4n-bin-usr-local-bin-usr-bin-bin-usr-games-755958/)

i_heart_pandas 09-17-2009 11:56 AM

echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ?
 
i don't know why but for example but commands like cat don't work (although i can be explicit /bin/cat)

i have no .bash_profile so i'm lost??

also this problem doesn't let me login though gdm (/home/g3rc4n/bin/readlink "not found")

i tried writing the paths explicitly in .bash_profile but works for the shell but can't login gdm????

repo 09-17-2009 11:59 AM

Which distribution ?

i_heart_pandas 09-17-2009 12:14 PM

debian 5 with custom 2.6.31 kernel

repo 09-17-2009 01:00 PM

Is this a fresh instl?
Did you delete .bash_profile ?

Here is an exemple

Quote:

# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/login.defs
#umask 022

# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
PATH=~/bin:"${PATH}"
fi

i_heart_pandas 09-17-2009 07:27 PM

well that done the trick, but my other account doesn't have a .bash_profile and that works fine.

no it wasn't a fresh install, but i've been moving all my partitions around alot recently and all the permissions are lost etc so i didn't do it right

lutusp 09-17-2009 07:41 PM

Quote:

Originally Posted by i_heart_pandas (Post 3687216)
i don't know why but for example but commands like cat don't work (although i can be explicit /bin/cat)

i have no .bash_profile so i'm lost??

also this problem doesn't let me login though gdm (/home/g3rc4n/bin/readlink "not found")

i tried writing the paths explicitly in .bash_profile but works for the shell but can't login gdm????

Make a copy of the default .bash_profile from /etc/skel into your own directory. Set its ownership appropriately:

Code:

# chown username .bash_profile
Do this same procedure for any other boilerplate files you may have deleted.

And ... before deleting files, ask yourself what they are for. If you can't answer, don't delete them.

repo 09-18-2009 01:21 AM

Quote:

no it wasn't a fresh install, but i've been moving all my partitions around alot recently and all the permissions are lost etc so i didn't do it right
Perhaps you can consider to make a backup, and do a fresh install.

paulo.monk 09-18-2009 08:33 AM

I say the same as repo.
I don't know much details about your system, but this, for me, sounds like an compromised system.
You should make some criterious backup [pay atention to possible hiden malwares - like scripts downloaded from untrusted source], do an fresh install and set up some firewall (or improve yours, if you have one configured already).
If you really wants to stick with your actual instalation, at least run some chkrootkit. After that, if nothing bad is indicated, you could run some administrative tasks, like run:

netstat -nlutp

to see listenning services on your machine and look for something suspicious. Its important to run chkrootkit before to confirm that your system wasnt compromised to hide some malware activity.

Good luck


All times are GMT -5. The time now is 02:08 AM.