0

This is my environment :

Solaris Version 10; Sun OS Version 5.10 Oracle Version: 11g Enterprise x64 Edition.

When I am getting log on through putty it is giving me this output:

login as: ora Using keyboard-interactive authentication.

Password:

Last login: Sun Nov 2 10:24:21 2014 from abc

It is not showing "$" sign or anything.. I cant write on it but cannt execute linux command or get any output from it. I have even logged in by root password and yet still same. Can I one descirbe me this to me and guide this matter.

My Oracle Based Database is running on it and I dont want to restart my server. So how can I fixed it and get $ or # ??

  • @choroba... sorry ?? I didnt get it.. – Ali Immam Nov 2 '14 at 7:59
  • @choroba He posted on SO, was told that it was the wrong place, so he reposted here. What's your point? I guess he should have deleted the original, too. – Barmar Nov 2 '14 at 9:03
  • Does this only happen when you login using SSH, or also when you login on the console? It sounds like a problem with one of your shell startup scripts. If it happens to multiple accounts, it maybe /etc/profile or /etc/bashrc. – Barmar Nov 2 '14 at 9:05
  • Put set -x at the beginning of /etc/profile and ~/.profile. This will make them show all the commands as they're executing, and you can see where it hangs. – Barmar Nov 2 '14 at 9:06
  • @Barmar.. Yes.. But how can put set -x at the beginning of /etc/profile and ~/.profile when its not executin any commands when I am writing on it... – Ali Immam Nov 2 '14 at 9:14
1

You'll almost certainly be looking at a failure during the login process. Something is hanging and preventing you from reaching an interactive shell.

Try the following tricks to get back in:

  • Log in as a different user / find someone else on the server with a login, then su <your username> (note the lack of '-' in su, this skips the target user's environment)
  • Log in as root / ask the sysadmin to edit your profile for you as root
  • Connect via ftp or ftps
  • Try your luck via a non-interactive link like scp, rsync -e ssh, or sftp

Provided one of these tricks gets you access and you get an interactive shell, you should then move aside your profile files:

mkdir broken-profile-files ; mv .profile .bashrc .login .cshrc .bash_profile broken-profile-files

If you have a non-interactive shell via something like ftp, use ls or ls -a to identify any profile files and either move or delete them (typically rename or delete)

If you can get in via something like rsync, you can backup the current version of the files first by doing an rsync pull, then push an empty file back up to overwrite it.

Once you are back in and running with an empty profile do the following to debug:

  • Open a new shell, leave it open, don't touch it, don't close it. In fact, open two, why not? This will be your "get out of jail free" card.
  • Now copy back your profile files one by one, attempting to login via a new window each time until you get the problem back
  • Either add set -x to the top of the file that's giving your trouble or throw a few echo "Here" lines in it to track how far through you get before it freezes
  • Identify the issue and debug/prune as required

Probably causes of a hang:

  • Attempting to explore a directory tree that's invalid or stale (eg shell expansion of * on a stale NFS mount of autohome directory)

One last thought: There's also the possibility that you have a larger fault in one of the global config files, in which case I'd recommend you just come up in single user mode and fix it that way.

  • I have resolved the issue. The server was on hang state due to hardware failure. I let it remained logged in for more than 30 mins & it got the terminal. But thanks for the suggestions , they where really really helpful and exactly what I was looking for !! Thanks again !! :) – Ali Immam Mar 25 '15 at 8:50
0

I have resolved the issue.

The server was on hang state due to hardware failure. I let it remained logged in for more than 30 mins & it got into the terminal.

But thanks for the suggestions especially Smiling Dragon!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.