LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Strange output when ssh - bash: ... command not found (https://www.linuxquestions.org/questions/linux-newbie-8/strange-output-when-ssh-bash-command-not-found-724673/)

Azazwa 05-08-2009 08:23 AM

Strange output when ssh - bash: ... command not found
 
Hi!

If I ssh from my headnode to another node as root, I don't seem to get problems, but when I want to become a normal user, it gives me this:

Code:

[root@gnlserv01 ~]# ssh -X normnode1.up.ac.za
Warning: No xauth data; using fake authentication data for X11 forwarding.
Last login: Fri May  8 15:12:20 2009 from snode0.oscardomain.za
[root@normnode1 ~]# su compchem
bash: dircolors: command not found
bash: sed: command not found
bash: grep: command not found
bash: grep: command not found
bash: sed: command not found
bash: grep: command not found
bash: whoami: command not found
bash: getent: command not found
bash: getent: command not found
bash: egrep: command not found
bash: tail: command not found
bash: awk: command not found
bash: wc: command not found
bash: [: -ne: unary operator expected
generating ssh file /.ssh/id_dsa ...
bash: ssh-keygen: command not found
generating ssh file /.ssh/identity ...
bash: ssh-keygen: command not found
generating ssh file /.ssh/id_rsa ...
bash: ssh-keygen: command not found
bash: cat: command not found
adding id to ssh file /.ssh/authorized_keys2
bash: /.ssh/authorized_keys2: No such file or directory
bash: cat: command not found
adding id to ssh file /.ssh/authorized_keys
bash: /.ssh/authorized_keys: No such file or directory
bash: cat: command not found
adding id to ssh file /.ssh/authorized_keys2
bash: /.ssh/authorized_keys2: No such file or directory
bash: chmod: command not found

How do I cure it?

Thanks!

Poetics 05-08-2009 08:41 AM

Does that happen for every user you su to? What is their PATH variable?

sarin 05-08-2009 08:46 AM

Try "su - compchem" (note the use of "-")
Also, see if you have the home directory of compchem intact on the system and that it is owned by compchem.

Azazwa 05-11-2009 09:23 AM

Hi !

I think the "su - compchem" cured it, although I would also get it if I did /bin/bash. The home directory of compchem is intact, and it is owned by compchem as far as I can see. It looks like this for all the files:

Code:

[compchem@normnode1 ~]$ cd
[compchem@normnode1 ~]$ ll
total 9616
-rw-rw-r-- 1 compchem compchem    331 2009-04-14 18:26 Browse.desktop

The path looks like this:
Code:

[compchem@normnode1 ~]$ echo $PATH
/soft/network/general/bin:/opt/maui/bin:/opt/pgi/linux86-64/8.0/bin:/opt/pgi/linux86-64/8.0/mpi/mpich/bin:/usr/local/bin:/bin:/usr/bin:/opt/pvm3/lib:/opt/pvm3/lib/LINUX64:/opt/pvm3/bin/LINUX64:/opt/env-switcher/bin:/opt/pbs/bin:/opt/pbs/lib/xpbs/bin:/opt/c3-4/:/soft/gaussian/g03/bsd:/soft/gaussian/g03/private:/soft/gaussian/g03:/soft/gaussian:/home/compchem/bin

Thanks!


All times are GMT -5. The time now is 05:56 PM.