Sudo Hangs
Problem description.
one day during work, I encountered this problem, every time I sudo a command,
it took awhile to prompt from password.
how to fix it
I recalled that one of my colleague share how he use strace to debug a application.
I decided to give it a shot.
1
| |
the log file is very large, these lines tells what cause the problem
1 2 3 4 5 6 | |
I changed the hostname in /etc/hostname day before. Line 4 say that it want to send somthing to JCubuntu (which is my new hostname),
but it couldn’t, so time out occurred.
the solution is adding a new line to the /etc/hosts
1
| |
the problem will disappear