1

i am new to ubuntu and recently tried changing my hostname and have probably messed up something,and have trouble fixing it.

Whenever i give command like get sdu sudo apt-get install g++ (some command using sudo)

  sudo: unable to resolve host Cricketpunk 

shows up,after 4 seconds of wait.After reading few questions,i tried changing something in /etc/hostname,but it says access denied when i try opening that file

i Cannot boot into recovery mode due to soome bios fault

I need help on how to achieve sudo rights using live flash drive containing ubuntu.

Any help would be much appreciated. Have a good day :)

  • 5
    You will need to boot recovery mode and either revert the changes you made to the /etc/hostname file or make the /etc/hosts file consistent with it: see Lost access to sudo – steeldriver Dec 27 '15 at 14:03
  • Hi, thanks for the reply. Unfortunately, I can't seem to boot into recovery mode. can you outline some way I can do this process from a bootable pen drive? – Sridhar Thiagarajan Dec 28 '15 at 03:16
  • You should just be able to mount the broken system's root from the live pen drive system and edit the file(s) from there: I don't have time to write a proper answer right now but will check back – steeldriver Dec 28 '15 at 03:49
  • Hi, in the live new pen drive, when I click on root folder, it says permission denied. – Sridhar Thiagarajan Dec 28 '15 at 03:58

0 Answers0