If you are facing error Like:

abhinav@EthicalHackx:~$ sudo /etc/init.d/smbd stop
sudo: unable to resolve host EthicalHackx: Resource temporarily unavailable

 

Here is how to Solve this error when doing sudo

Your Host Name is not present in you Hosts file after you changed it, so just add it in Hosts file located at /etc/hosts and also at /etc/hostname with the familiar structure of hosts file like in example below.

Your /etc/hosts and /etc/hostname will be like this after you add it.

$ cat /etc/hostname
EthicalHackx
$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 EthialHackx

Restart your system and the error is gone forever.

What Do You Think on This ? Say Here