Live CD changing login prompt in Linux

Q I have a Dell Inspiron 6000 with PCLinuxOS 2007 installed, and booted a DVD with various Live distros. Afterwards I removed the disk and re-booted. Opening a terminal I expected the usual

peter@Laxey $

prompt. I was rather shocked to see a new prompt, which is now

peter@ubuntu $

What on Earth is going on here? Has the Live CD somehow altered my installed system and changed my settings?

A I can see why you would be alarmed. It looks like the Ubuntu Live CD has hijacked your system, but this is not the case. It's all down to the way different distros use DHCP to configure the network, and how your DHCP server works. When a computer broadcasts a DHCP request over the network it can optionally include a hostname, which the DHCP server may use to determine the address to give it. If it doesn't send a hostname, the server may well issue one. What appears to be happening here is that PCLinuxOS is set to not send a hostname with the request, and the DHCP server has not previously sent one back, so the hostname from your settings is used. You've run the Ubuntu Live CD on the same computer and it has sent a hostname of 'ubuntu' with its DHCP request.

The DHCP server has remembered this, so the next time it gets a request without a hostname from the same computer, it send the same hostname you used last time (the DHCP server uses the hardware MAC address of your Ethernet adaptor to determine that this is the same computer). The easy solution to this occurrence (it doesn't merit the title of problem) is to set PCLinuxOS to behave in the same way as Ubuntu and send a hostname with its DHCP request. This will prevent the DHCP server trying to 'help' by looking up the last-used hostname because it thinks you forgot to send it this time. To do this with PCLinuxOS, go to the Network section of the control centre, select 'Reconfigure A Network Interface' and go to the DHCP tab. Tick the 'Assign Host Name From DHCP Address' box and type your preferred hostname into the box below this. On the next boot, your computer should be correctly named, and will remain so no matter how many Live CDs you throw at it.

Back to the list