Search code examples
linuxbashauthentication

10 second delay between login and shell prompt.


I've got a strange problem. After I enter my password on a debian 6.0 system, I get the motd but then there is a 5-10 second pause until I get a shell prompt. If I press ctrl-c during that pause the prompt comes up instantly. What could be happening here? Am I killing the login process? Why might it be taking so long to invoke bash? I appreciate any suggestions.

Thanks


Solution

  • You can debug bash shell scripts using set -x and set +x. The set -x command enables debug mode and the set +x command disables it.

    Putting set -x at the top of your $HOME/.bash_profile should cause debug information to be printed for your personal shell initialisation files. If as you say you get a 10 second delay you should be able to track it down quite easily. If This doesn't shed any light then go for the system wide initialisation file /etc/profile.

    Bash Debugging and shell initialisation files