1752777 Members
6188 Online
108789 Solutions
New Discussion

Re: login hanging

 
SOLVED
Go to solution
jerrym
Trusted Contributor

login hanging

I've got the infamous login hang requiring ctrl-c to finally get in.

Moved user .profile to .profile.no. Moved /etc/profile to /etc/profile.no

Just the one newly built box 11.11 with patch bundles.

 

As root I can su user without problem. But when su - user , sourcing env, it hangs and I have

to do cntrl-c two or three times and wait a while to get login prompt.

 

I've delt with problems like this before with resolve and path and nfs. But can't find anything

that would be causing this.

 

24 REPLIES 24
Dennis Handly
Acclaimed Contributor

Re: login hanging

>I've got the infamous login hang requiring ctrl-c to finally get in.

 

Any infamous login hang that I've seen usually can't be ctrl-C.

You need to add "set -x" to your .profile to see what the last lines are.

Naj
Valued Contributor

Re: login hanging

Hi,

Did you try ssh under debug mode?

try this

#ssh abc.om -v

we can get somehint from there

Thanks


____________________________________________
:: Really appreciate if you could assign some points.
:: Don't know how to assign point? Click the KUDOS! star!
jerrym
Trusted Contributor

Re: login hanging

I did the set -x and it goes through all he way to the end of /etc/profile. I even moved my .profile and the /etc/profile so they would not get sourced at all. Tried to run ssh host -v but that works find. It's just that I do not get a login prompt unless I do a ctrl-c several times. The last thing I did on the server was doing a patch commit to clear out the save dir.  Does doing a patch commit require a reboot??

Dennis Handly
Acclaimed Contributor

Re: login hanging

>I even moved my .profile and the /etc/profile so they would not get sourced at all.

 

And it still hung?  Where is your $HISTFILE pointing to?

 

>I do not get a login prompt unless I do a ctrl-c several times.

 

Do the following (on another window) to see which process is hanging:

UNIX95=EXTENDED_PS ps -H -fu your-hung-username

 

>Does doing a patch commit require a reboot?

 

No, it just fiddles with the IPD.

jerrym
Trusted Contributor

Re: login hanging

I do know that as root if I  su user  it does not hang. If as root I  su - user  it hangs. - its sourcing something.

Could you explain UNIX95. I vaguely remember something about that. How are you saying to do it on another window??

 

 

Dennis Handly
Acclaimed Contributor

Re: login hanging

>If as root I  su - user  it hangs. - its sourcing something.

 

Right, you said that.  What shell are you using?  (I've been assuming sh/ksh.)

 

>Could you explain UNIX95. I vaguely remember something about that.

 

Nothing to explain, just do it.  ;-)

It enables the -H option, for a hierarchical listing of processes.

http://h30499.www3.hp.com/t5/tag/UNIX95/tg-p

 

>How are you saying to do it on another window?

 

One window is hung, do it in another, it doesn't matter if you are root or any other user.

jerrym
Trusted Contributor

Re: login hanging

okay. ksh

 

I am currently hung on one window with user moorej. Im running in another window

as root.

 

 # UNIX95=EXTENDED_PS ps -H -fu moorej
UID        PID  PPID  C    STIME TTY          TIME CMD
moorej   19309 19307  0 16:54:24 ?           00:00 sshd: moorej@pts/0
moorej   19312 19309  0 16:54:24 pts/0       00:00   -ksh

 

 

What's interesting is that I su - phamn who is running csh and that session comes right up. What gives with ksh??

 

 

Dennis Handly
Acclaimed Contributor

Re: login hanging

>What's interesting is that I su - phamn who is running csh and that session comes right up.

 

(When you use the scummy C shell, it's not tricky, so it can't fail like this. ;-)

 

I asked above, what is $HISTFILE?  For old OS versions, if it was over NFS, you could get hangs.

Do you have all your NFS, automounter, etc patches?

But if you moved aside ~/.profile , then HISTFILE wouldn't be set.

 

jerrym
Trusted Contributor

Re: login hanging

Correct. no histfile

This server is a new build with all patches. Login was working before. Seems after the server was rebooted that this problem started.

 

I am out of tricks and possible things to check. There is no truss on this server or I would try to use that. I will have to look into loading it.