Ok I not only edited the hostname in: /etc/host where I added the IP address: X.X.X.X server1.example.com server1 but also in /etc/hostname and this is where I screwed up. Instead of just entering: server1.example.com I went - #server1 server1.example.com And now I can't get back in to correct the problem, I keep getting sudo: unable to lookup #server1 Now what should I do, reinstall?? Ubuntu Server 6.06 LTS with LAMP Thanks
Thank you Falko. I had tried that but to no avail, having the 2 lines hostname has stopped any type of repair. I even just booted into recovery mode to no avail. I am currently reinstalling the OS and will chalk this up to a learning experience for a beginner Linux user. I did however rename the hostname because the steps in both the 6.10 and 6.06 version on the HowTo's do not produce the results as stated by issuing the commands: hostname hostname -f as per instructions. After editing the /etc/host file as instructed those commands did not give identical results so hence the reason I went into /etc/hostname file top begin with. I also did not use the sudo passwd root but rather just executed the sudo -s as one members comments had suggested. These HowTo's are the best.
Ok, what's in /etc/hosts and /etc/hostname, and what's the output of Code: hostname and Code: hostname -f ?
Ok prior to editing /etc/hosts 127.0.0.1 localhost 127.0.0.1 myserver1 After editing /etc/hosts 127.0.0.1 localhost.localdomain localhost 192.168.0.1 myserver1.example.com myserver1 Execute after rebooting: hostname myserver1 hostname -f myserver1.example.com Prior to editing /etc/hostname myserver1 After editing: myserver1.example.com Now issuing both commands matches each result. myserver1.example.com