Fresh install- Hostname wrong

Ridiculous problem this :stuck_out_tongue:
Just completed a fresh netinstall of OpenSUSE. This machine previously had a Ubuntu install on it, but I was having all sorts of issues and decided I required a fresh start. The install itself went acceptably, although I ended up manually fixing GRUB.
Now the system is running, I’ve got a ridiculous problem, in that I’m still seeing the old hostname- It used to be ubuntu-server, but should now be unimatrix-001.
Checked both the obvious places (/etc/HOSTNAME & YaST), but the correct hostname is in both of them.

Anyone care to explain this to me? lol

Cheers

By YaST you mean YaST / Network Devices / Network Settings / Hostname/DNS Tab? Don’t forget to reboot ALL computers that might propagate the name through the network.

Thank You,

Typically, you’re likely using DHCP.

If so, remember to either <uncheck> the box in Network Device > Hostname/DNS > Change Hostname via DHCP

Are you located in a LAN with network authentication? If so, I’d recommend you delete the existing DHCP Lease that corresponds with your machine’s MAC address and remove the old DNS entry (Your DHCP could be recognizing your machine because you’re using the same MAC address and doing a local DNS lookup to discover your old Hostname, then assigning to you)… Then re-connect your machine to the network.

HTH,
Tony

Where are you seeing the old hostname?
If on other systems, check their /etc/hosts and your router (to ensure it isn’t cached there).
If it’s on the current system, create a test user and see if the problem is the same for that user.
If it is, then you’ll want to check that Assign Hostname via DHCP is unchecked and check your router/DHCP server
If it isn’t take a look at ~/.bashrc to see if you’ve hard coded into your PS1 variable

Also, what did you keep from your old system? /home or /etc/ files?

Will

Checked both the obvious places (/etc/HOSTNAME & YaST), but the correct hostname is in both of them.

Have a look in /etc/hosts as well. Edit: /etc/host.conf might also be interesting.

Bingo, cheers :slight_smile:
Static DCHP entry propagating the old hostname. Time to murder the router I think.

Haven’t kept anything from the original system other than the 6tb worth of filled storage, I decided troubleshooting whether any problems were caused 5 years worth of accumulated rubbish in the config files was more hastle than recreating from scratch and doing it the other way round :slight_smile: