debianプロンプトが壊れている

debianプロンプトが壊れている

ssh 経由またはコンソールからログインすると、次のように表示されます。

Linux sensu.lbox.com 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Sep 27 12:40:33 2013
-bash: id: command not found
-bash: [: : integer expression expected
root@sensu:~#

これは何ですか?どうすれば取り除けますか?

-bash: id: command not found
-bash: [: : integer expression expected

ほとんどのコマンドが使えず、command not found instead

ありがとう。

答え1

結局、/etc/environment ファイルの不具合が原因でした。

答え2

これはすべてのユーザーで発生しますか、それとも root のみで発生しますか? 全員の場合、/etc/profile.d で最近 (問題が発生し始めてから) 変更されたスクリプトを探してみてください。find /etc/ -path *profile* -mtime -5 過去 5 日間に変更されたものを探すこともできます。root のみの場合、まず /root/.bashrc で不正なスクリプトがないか探してみてください。

関連情報