1

There is this ONE machine at work that always has a problem. It is all messed up. But one thing I thought I could fix was seeing this error ...

-bash: ource: command not found

... as soon as I ssh on to the host. It also happens if I su to another user ... as in:

$ sudo su -
Last login: Fri Dec  9 22:57:32 UTC 2022 on pts/1
-bash: ource: command not found

I looked at the /etc/profile and the /etc/bashrc and I do not see the string "ource" anywhere in them. Where else should I look? Is there something like set -x I can set to debug login scripts?

Red Cricket
  • 2,203
  • 4
    The files in /etc are generic versions. Each user also has hidden versions in their home directories. I have ~/.bashrc and ~/.profile. Check those too. Almost certainly there is a bad edit, and that word should be source. – Paul_Pedant Dec 09 '22 at 23:15
  • 1
    ah! It was a script in the /etc/profile.d directory. – Red Cricket Dec 10 '22 at 02:08
  • https://unix.stackexchange.com/questions/457888/how-to-find-all-locations-where-path-is-set/457903 – muru Dec 10 '22 at 02:39
  • 1
    @RedCricket As the issue has been resolved, will you write an answer or will you delete the question? Alternatively, we can delete the question. – Kusalananda Dec 10 '22 at 07:07
  • Also remember to accept the answer. – doneal24 Dec 10 '22 at 20:31

1 Answers1

1

I found that in the this system's /etc/profile.d directory there where many (around 20) different scripts and one of them had a typo of ource. I fixed the typo (changed the string to source) and the problem was corrected.

Red Cricket
  • 2,203