Link to home
Start Free TrialLog in
Avatar of ecsginc
ecsgincFlag for United States of America

asked on

RHEL 5 : Can only log in as root

I rebooted my RHEL5 server today.  After discovering I couldn't remote in using ssh, I checked the console and it appeared the system was in runlevel 1 for some reason.  I rebooted again, watched the boot process and couldn't see anything significant.  I checked the runlevel, set the default runlevel to 3 and rebooted again with no effect.  I can log in to the console as root.  But, I cannot log in as any other existing user.  The login fails with no feedback.  If I try to "su - " to the user, I get a "permission" denied to the user's home directory and a "permission denied" to "/bin/bash".  I have tried to troubleshoot by adding a new user and logging in.  Same effect.

The "runlevel" command yields "N 3" which I am pretty sure means it thinks it is running in level 3 now.

All mounts seem to be OK.  I have rebooted with "-F" to force fsck, no problems.  I can navigate to all mounted volumes and access files on all of them.

I'm stumped.  The system was running and accessible when I rebooted earlier.  It is possible I mucked something up earlier when I was working on something else.  But, I am not sure what that might be.

I have crept around the web and there is rarely any mention of this problem.  When I find something, the suggestion of using "strace" is prevalent (did it, didn't reveal any permission issues that I can tell)  or some version of reinstall OS is deployed.

Anybody have any suggestions?
Avatar of Lofty Worm
Lofty Worm
Flag of United States of America image

I am no *nix guru, but I got strong suspicions that you have rooted :(

Maybe check your root boot files and see if anything is amiss

My 2 cents
Is there any message about damaged initrd or anything? If you have damaged boot files a system will usually drop to a minimal root session if it can get that far...
Avatar of ecsginc

ASKER

All boot of the errors are permissions issues similar to the su errors.  I am now thinking that somehow some uid, gid or permission got inadvertently change.  At this point I am now keying in on the sticky bit.  Does anyone have a list of standard system directories and or files where the sticky bit needs to be set?
ASKER CERTIFIED SOLUTION
Avatar of ecsginc
ecsginc
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ecsginc

ASKER

I discovered the apparent cause of my original issue.
If you have a backup for system taken before issue, then you can restore and you will get the old perms