I'm working on ubuntu 14.04. I cant login to my pc as a root user.I tried different ways and i cant still the issue.
If i give sudo command the response is like
> ubuntu@ubuntu72:~$ sudo su sudo: unable to resolve host ubuntu72 [sudo] password for ubuntu:
Then i tried the command to get host details
nano /etc/hoststhe response is
*127.0.0.1 localhost 127.0.1.1 ubuntu-Invalid-entry-length-0-DMI-table-is-broken-Stop # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters [ Read 9 lines (Warning: No write permission) ] ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell *
I need to edit this line to solve this issue , i'm unable to edit this line
How can i edit this line how can i edit i tried this ways.
`ubuntu@ubuntu72:~$ sudo -i gedit /etc/hosts sudo: unable to resolve host ubuntu72 [sudo] password for ubuntu:
ubuntu@ubuntu72:~$ chattr -i /etc/hosts chattr: Permission denied while setting flags on /etc/hosts
By command gedit /etc/hosts i'm able to open the hosts file .I cant change permissions
ubuntu@ubuntu72:/$ chmod 777 -R /etc/hosts chmod: changing permissions of ‘/etc/hosts’: Operation not permitted
`How can i edit this /etc/hosts to fix this issue? Is there any way to fix this issue?