telnet su - stalling - hung su and bash

Get answers here.

Moderators: BBear, theunknownhost, flaguy

Post Reply
User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

telnet su - stalling - hung su and bash

Post by Sapphyre » Tue Apr 24, 2012 7:53 pm

[Not Navi/nor Cpanel server]
What is causing this issue when I try to su - or su - root ?
I get as far as the password prompt fine, enter the root password, and it hangs. I need to open another session and log in only as root (without -) - I see rising loads and a bash process using over 50% CPU. If not stopped, the load climbs until it affects services! I need to kill 9 the hung su and bash process.

I am then still left as root without superuser

su root is fine.

This has happened before - always resolved after I killed the hung process, closed all sessions and rebegan. No joy this time. Is there a specific file that could be corrupt that I should be looking for?

User avatar
theunknownhost
Official Test Penquin
Posts: 2713
Joined: Mon Aug 05, 2002 1:05 pm

Post by theunknownhost » Tue Apr 24, 2012 8:26 pm

did you try restarting ssh?

User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

Post by Sapphyre » Sat Apr 28, 2012 1:10 am

Thanks for your help.
We ended up losing all remote access, and needed to have the server manually rebooted earlier today. I didn't think to have him just try restarting sshd! The good news is that all services came back online immediately without further intervention and the load is _now_at 0.00 - I never saw that before! Of course, even the west coasters have gone home now too... but I never saw it that low before overnight.

User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

Issue continues with hung SSH when I try su -

Post by Sapphyre » Sun Apr 29, 2012 8:50 pm

Have rebooted the server, have also restarted SSHD
Have cleared wtmp

I still can't su - however

Code: Select all

3847 root      25   0  1308 1308  1068 R    49.9  0.0   5:38   1 bash
I enter the password and nothing happens, prompt never returns. Open a second instance and log in as my username and su root, to see in top (as above): a bash process in state (R)unning and consuming about 50% CPU
I then must kill 9 it, which demotes my original login back to my own username

I have tried clearing the wtmp in case that was corrupt.

User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

su root a problem too? But it tells me I am root?

Post by Sapphyre » Mon Apr 30, 2012 4:53 pm

whoami says I am root
id says I am root
w shows user3yu6 [priv]
echo $PATH is not showing any of the /usr/sbin and other root paths, so I can't run many commands like 'service'

I did vncserver :1, and got:
[root@server8g768 user3yu6]# vncserver :1

New 'server8g768:1 (user3yu6)' desktop is server8g768:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/top2:1.log

but it's not letting VNC Viewer on my desktop do anything, just like if I tried to run it before starting the VNC server on the server.

As far as I can tell, /etc/profile has the "munge" stuff in it that should award me the proper root path.

This is CentOS if that helps?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest