修改/etc/nsswitch.conf: 注意看红色部分: # /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the `glibc-doc-reference' and `info' packages installed, try: # `info libc "Name Service Switch"' for information about this file. passwd: compat group: compat shadow: compat #hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 hosts: files dns networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis 记得以前只需要将DNS和网关去掉就可以了的, 但是到了UBUNTU上去不行