10 second delay between login request and shell.

I have a strange problem. After I entered my password into debian 6.0, I get motd, but then it pauses for 5-10 seconds until I get a shell prompt. If I press ctrl-c during this pause, a prompt will appear instantly. What could be here? Am I killing the login process? Why can it take so long to invoke bash? I appreciate any suggestions.

thanks

+6
source share
3 answers

You can debug bash shell scripts with set -x and set +x . The set -x command turns on debugging, and the set +x command turns it off.

Putting set -x at the top of your $ HOME / .bash_profile file should trigger debugging information for your personal shell initialization files. If, as you say, you get a 10 second delay, you should easily track it. If this does not shed light, go to the system-wide initialization file /etc/profile .

Bash Debugging and Shell Initialization Files

+11
source

There is probably something in your .bashrc or .bash_profile . Or perhaps some other startup file ( /etc/profile , etc.).

+3
source

Same problem as John Ricks for me. / opt / vmware / bin / ovfenv was the culprit.

I found this post after the following research: running another bash will take up to 30 seconds on CentOS6

 strace bash 

shows a few lines before they hang:

 read(3, "LANG=`/opt/vmware/bin/ovfenv --q"..., 183) = 183 

Removed script from executable file:

 mv /etc/profile.d/zzzz-vamilocale.sh /etc/profile.d/zzzz-vamilocale.sh.ko 
0
source

Source: https://habr.com/ru/post/903280/


All Articles