Solved

RHEL 5 : Can only log in as root

Posted on 2016-09-14
6
46 Views
Last Modified: 2016-09-21
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?
0
Comment
Question by:ecsginc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 11

Expert Comment

by:loftyworm
ID: 41798694
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
0
 
LVL 10

Expert Comment

by:Scott Silva
ID: 41798894
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...
0
 

Author Comment

by:ecsginc
ID: 41801768
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?
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Accepted Solution

by:
ecsginc earned 0 total points
ID: 41802028
FYI - I solved my problem.  After scouring permissions and ownership until my eyes bled (all errors in /var/logs/dmesg and /ver/log/messages aligned with permissions issues) I threw a Hail Mary and executed "chmod 755 /".  prior to this it was more of 744.  That did the trick.

I am not sure why or how the permissions got changed (I am suspecting and errant scripting inadvertently executed as su/root with empty environment variables yielding "/" on a chmod operation).

Regardless, if anyone should end up on this thread with their own issues, changing the permissions on the root directory ("/") did the trick for me.
0
 

Author Closing Comment

by:ecsginc
ID: 41808401
I discovered the apparent cause of my original issue.
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 41808426
If you have a backup for system taken before issue, then you can restore and you will get the old perms
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Zimbra on Amazon Linux help 7 159
HOw To Install Docker on VMware Workstation 19 647
SSH in linux 9 93
php mail() send emails but the message is lost 4 33
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question