Results 1 to 2 of 2
I was tired of a bland hostname, so I foolishly edited /etc/hostname.
Unfortunately, any time I try to run the sudo command now, it fails because of a faulty gethostname() ...
- 05-26-2006 #1Just Joined!
- Join Date
- May 2006
- Posts
- 14
Lost root access, edited /etc/hostname
I was tired of a bland hostname, so I foolishly edited /etc/hostname.
Unfortunately, any time I try to run the sudo command now, it fails because of a faulty gethostname() call. I realize now that I should have used the "hostname <new hostname>" command to change it, but I cannot edit /etc/hostname back to its original setting because I need root permissions!
Rebooting did not reset the hostname, nor did it update /etc/hosts.
What can I do to fix my stupid mistake?
- 05-26-2006 #2Just Joined!
- Join Date
- May 2006
- Posts
- 14
Nevermind.
I fixed the problem by following these steps:
1) Rebooting into recovery mode
2) Editing /etc/hostname back to its original values
3) Rebooting normally


Reply With Quote