
Hi After playing with my networking settings in Breezy, I seem to have lost some data from my /etc/hosts file. Partly it requires editing to add to add "ubuntuDavid" to it. However without it I can't log in as root to edit it. Can't find password! I can't edit it with Knoppix, I don't have permission. Is there any way to edit it or is it a reinstall job. As it is I can't connect to the net or anything requiring root privilege. Thanks David Bowen

Hi Dave, The file probably needs permissions changed for it to be edited under knoppix chmod a+w /mount/drive/etc/hosts If this still doesnt work, its time to boot to single user mode <g> This should give you some direction from http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/s1-resc... Select Ubuntu with the version of the kernel that you wish to boot and type e for edit. You will be presented with a list of items in the configuration file for the title you just selected. Select the line that starts with kernel and type e to edit the line. Go to the end of the line and type single as a separate word (press the [Spacebar] and then type single). Press [Enter] to exit edit mode. Back at the GRUB screen, type b to boot into single user mode. Then edit your file Regards Shane On Saturday 15 July 2006 22:00, David Bowen wrote:
Hi
After playing with my networking settings in Breezy, I seem to have lost some data from my /etc/hosts file. Partly it requires editing to add to add "ubuntuDavid" to it. However without it I can't log in as root to edit it. Can't find password! I can't edit it with Knoppix, I don't have permission. Is there any way to edit it or is it a reinstall job. As it is I can't connect to the net or anything requiring root privilege.
Thanks David Bowen
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug

After playing with my networking settings in Breezy, I seem to have lost some data from my /etc/hosts file. Partly it requires editing to add to add "ubuntuDavid" to it. However without it I can't log in as root to edit it. Can't find password!
Here's a possibility: root doesn't have a password set at all under ubuntu. Instead, log in as your user and run 'sudo nano /etc/hosts', and enter *your* password in. This assumes that your account is the first one that was created when you installed the machine. If this doesn't work, it possibly means that more than the hosts file has become corrupted. Consider upgrading to dapper at about this point.
I can't edit it with Knoppix, I don't have permission. Is there any way to edit it or is it a reinstall job.
With knoppix you'd still need to run a root terminal, instead of just the normal one.

With knoppix you'd still need to run a root terminal, instead of just the normal one.
You also need to mount the filesystem read-write, knoppix defaults to mounting things read-only. The GUI way; right-click the icon for your filesystem, unmount if it's already mounted, then chose the option for mounting read-write. The root-terminal way; mount /mnt/hda1 -o remount,rw (I forget exactly where knoppix mounts things and /mnt/hda1 is a guess... substitute the actual mountpoint here) And as Daniel says, you'll need to edit the file as root too.
participants (4)
-
Daniel Lawson
-
David Bowen
-
Shane
-
zcat