tsze

Registered
Aug 25, 2004
4
0
151
Hi,

Maybe i named a wrong hostname, then error message show:
Invalid Hostname. (swede.mydomain.com ). Hostnames may not contains spaces or tabs.

When i want to change another name there still show:
Invalid Hostname. (swede.mydomain.com ). Hostnames may not contains spaces or tabs.

How can i change it back?

Any help would be great!!
 

Setheronie12

Well-Known Member
Feb 3, 2004
46
0
156
Ok here is what you need to do..

Login to your WHM under root

http://domain.com:2086
or use the Secure connection
https://domain.com:2087

once you have logged in under root look on the Left side. Under Server Setup and a few lines down is Change Host Name. Cick on that and edit the host name to what you want. Make sure you dont use spacses. Then click on Edit Setup, make sure that the Host Name is set to your new host name and not the other.


Thanks
Seth
 

tsze

Registered
Aug 25, 2004
4
0
151
Thanks help!
But when i click Change Host Name, there still said
Invalid Hostname. (swede.mydomain.com ). Hostnames may not contains spaces or tabs.

Its seems can't change back, whatever what i click WHM still said:
Invalid Hostname. (swede.mydomain.com ). Hostnames may not contains spaces or tabs.

Do i need to reinstall WHM?

Thanks again!
 

mhbrands

Member
Apr 12, 2003
17
0
151
Kansas
try it this way:

log in as root through ssh (using putty or other interface). Once there type in:

pico -w /etc/hosts
(change hostname)

pico -w /etc/sysconfig/network
(change hostname)

hostname (type in hostname)

Now reboot your server. When it comes back up, it will have reset your hostname.
 

tsze

Registered
Aug 25, 2004
4
0
151
Thanks!

Coz i just remote control my server, can i reboot by using SSH?
If yes, could you tell me the command?

Thanks again!
 

mhbrands

Member
Apr 12, 2003
17
0
151
Kansas
to reboot the server from the command line, type in:

/sbin/shutdown -r now

should fix it right up!