www.question-defense.com | Engage: Visit :: Login :: Register
Translate to English Übersetzen Sie zum Deutsch/German Переведите к русскому/Russian Μεταφράστε στα ελληνικά/Greek Vertaal aan het Nederlands/Dutch ترجمة الى العربية/Arabic 中文翻译/Chinese Traditional 中文翻译/Chinese Simplified 한국어에게 번역하십시오/Korean 日本語に翻訳しなさい /Japanese Traduza ao Português/Portuguese Traduca ad Italiano/Italian Traduisez au Français/French Traduzca al Español/Spanish
1

I ran in to the weirdest error today.   “sudo: unable to resolve host”. I got this error even running as root which was the really weird part.  I was especially confused because I have been running Linux as my main OS for the better part of 10 years and have never run into this issue. Turns out the solution is very simple and almost elementary however I decided to make a quick post about it.

Here is a screen shot of the issue. I actually had this on the Security Distro I work on called Backtrack. We made the newest build of our .iso with a new installer. Once I installed to hard disk, I got this error:

screenshot1

I got this error on every single .desktop file we had because most of Backtracks security tools need to be run as root so we add sudo -s to the end of every .desktop file in case people would rather create a user.

Turns out the issue was our installer. It had a issue with creating the /etc/hosts file. Apparently it wasn’t adding our host name properly. I did some looking and it seems the error is rather common from people forgetting to add their hostname to /etc/hosts. So here are a few pics of what i did.

/etc/hosts before:

screenshot2

/etc/hosts after:

screenshot3

So all  did was change the hostname from backtrack to bt. This could have been a error somewhere in our development team. This is however a perfect example of why the hosts file is important on Linux/Unix based systems.

Problem solved:

screenshot4

DeliciousStumbleUponDiggTwitterMixxTechnoratiFacebookNews VineLinkedInYahoo! Bookmarks
Related posts:
  1. sudo: sorry, you must have a tty to run sudo I was recently working on a Perl script that would...
  2. Litespeed: Input Error Detected. Please Resolve The Error(s). Path Does Not Exist. Today I was configuring a server running Postgres, Ruby, &...
  3. LOG: could not translate host name “localhost”, service “5432″ to address: Name or service not known I recently installed PostgreSQL on an Amazon Web Services CentOS...
  4. LiteSpeed Web Server Virtual Host Showing Restart Required in Web Admin Console Recently I configured a virtual host in Litespeed outside of...
  5. WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! If you attempt to SSH to a server and receive...

Tags: , , , , , , , ,
Leave a Reply