LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Errors at login, always worked fine (https://www.linuxquestions.org/questions/linux-newbie-8/errors-at-login-always-worked-fine-840962/)

macking 10-28-2010 09:08 AM

Errors at login, always worked fine
 
Have a server that I've logged into for months.

Today when I login, it logs in but I see the following:

Last login: Mon Aug 16 10:15:43 2010 from 192.168.1.147
-bash: id: command not found
-bash: [: =: unary operator expected
-bash: id: command not found
-bash: dircolors: command not found
-bash: /usr/bin/id: Permission denied
-bash: [: =: unary operator expected
-bash: /usr/bin/id: Permission denied
-bash: [: =: unary operator expected
-bash: id: command not found
-bash: id: command not found

I can still SU so I have control, but not sure what is happening here.

Would LOVE some help

unSpawn 10-28-2010 10:41 AM

Quote:

Originally Posted by macking (Post 4142246)
-bash: /usr/bin/id: Permission denied

[EDIT]Maybe no a $PATH issue (but show us 'echo $PATH' anyway), did you change file group/ownership? What does 'stat /usr/bin/id' return?[/EDIT]

macking 10-28-2010 10:50 AM

Tried stat /usr/bin/id and got this: -bash: stat: command not found

Did $PATH and got this:

-bash: /usr/kerberos/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/chrootssh/bin:/usr/X11R6/bin:/home/tim/bin: Permission denied


Does that help?

macking 10-28-2010 10:52 AM

Looks like I can't use many commands, like scp, ssh, etc.

I am part of WHEEL still, so I can su just fine. Sudo says command not found.

No changes to the environment at all.

unSpawn 10-28-2010 11:40 AM

Quote:

Originally Posted by macking (Post 4142350)
Tried stat /usr/bin/id and got this: -bash: stat: command not found

Could try '/usr/bin/stat /usr/bin/id' but I doubt that'll work since 'stat' resides in /usr/bin too...


Quote:

Originally Posted by macking (Post 4142350)
Did $PATH

I asked for 'echo $PATH'.


In any case it can't be a $PATH issue since executing a non-existing command (say 'perlddebug') should return "No such file or directory". The "command not found" could be a literal reference to /usr not being mounted (check with '/bin/mount' or '/bin/grep usr /proc/mounts') but then I can't place the "Permission denied"...


Quote:

Originally Posted by macking (Post 4142354)
No changes to the environment at all.

Best review changes since last login using the available package management tools (if any) that come with the distro (which one?) and review /var/log log files.

macking 10-28-2010 12:20 PM

Looked at /var/log messages and secure, nothing out of the ordinary. Suddenly started at 03am this morning.

I noticed it because a monitoring script started failing at 03:06:14 am



-bash: /usr/bin/stat: Permission denied


-bash: /usr/bin/id: Permission denied


echo $PATH
/usr/kerberos/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/chrootssh/bin:/usr/X11R6/bin:/home/timmy/bin



RedHat Enterprise Linux 5.1

Not sure what to do next???

Dblackner 10-28-2010 03:37 PM

@macking,
What kind of system are you running, does it have anything to do with the recent firmware updates, ver. 6.117 i think? not sure,. I had one of the original mac books, and I ended up replacing it because one day it stopped being able to locate my root directory when I logged in to the company site, so maybe its just a hardware flaw? good luck.
-D

unSpawn 10-28-2010 04:07 PM

Quote:

Originally Posted by macking (Post 4142446)
Not sure what to do next???

Did you check the mount commands I showed?


All times are GMT -5. The time now is 09:54 PM.