LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-08-2009, 09:23 AM   #1
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Rep: Reputation: 15
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!
 
Old 05-08-2009, 09:41 AM   #2
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Does that happen for every user you su to? What is their PATH variable?
 
Old 05-08-2009, 09:46 AM   #3
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
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.
 
Old 05-11-2009, 10:23 AM   #4
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Original Poster
Rep: Reputation: 15
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass output of one command as input to another on bash linuxlover.chaitanya Linux - Newbie 3 01-08-2009 02:46 AM
bash command redirecting output to file freeindy Programming 10 11-08-2007 06:48 AM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-28-2006 12:57 AM
strange output whan issuing the command find juanb Linux - General 2 09-21-2005 09:36 PM
Command output conrolling in bash pazvant Linux - Software 1 10-24-2003 08:01 AM


All times are GMT -5. The time now is 03:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration