Every single time I use sudo it hangs before completing

From @TheAndruu's answer to this question:

This happens if you change the hostname during the install process. To solve the problem, edit the file /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 [ADD_YOURS_HERE] 
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 [ADD_YOURS_HERE]

I had exactly the same problem on Fedora 11 and this solved it.


Sometimes when your default route isn't set, commands like sudo hang.

Try netstat -r to check if the route is set correctly.

Does this machine get its passwords from the local /etc/passwd file or something like ldap?


The only other thing you may want to check is your /etc/resolv.conf file to make sure you have a proper dns entry in there. I have seen in the past where this can cause delay.


You should check three things. 1. /etc/hostname 2. /etc/hosts 3. /etc/resolv.conf

I found that my hostname was correct that the hosts file was incorrect and on top of that the resolv.conf needed updating.