Change Hostname

How do you change the hostname in SLES11? I have normally used the /etc/hostname file and rebooted the server in other distros.

I only notice the way to change it is in yast2 -> network devices -> network settings -> Hostnames

I am looking for where it is stored because I want to write a script to update it (apart of a server deployment process).

Thank you for your time

I hate bumping but I’d really like to know since I can not find anything on google or anywhere else about this.

Put it in /etc/hostname as well as in /etc/hosts

I have done that and tried restarting but my hostname does not change unless I change it in yast.

I tried putting it in /etc/hostname and /etc/hosts and then rebooting. Executed “hostname” and it still reported the old one.

Changing it via Yast allowed me to update it right away without having to even reboot, just logout and log back in.

Maybe you could try SLES forum, as you can get better response from the tech and support team there.

SUSE Linux Enterprise Server (SLES) - NOVELL FORUMS

Tried it. They never seem to respond over there :\

I normaly advice people to use YaST because there are a few places where it should be done and YaST knows them where I always forget one or more.

I rely on YaST now and do not know any more all the places where to go.

Does anybody know if YaST keeps a lof of what it does realy?

Hi
Which SLE forum did you post in and when?

The three files to change are /etc/HOSTNAME (note case) and /etc/hosts
against the 127.0.0.2 address and also postfix/main.cf Its also the
fully qualified name (FQDN).


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 6 days 14:25, 4 users, load average: 1.89, 1.57, 0.96
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Here => Change Hostname - NOVELL FORUMS

That isnt my first post either, ive posted in there before and no one has ever responded.

Ill try your suggestion with /etc/HOSTNAME rather than /etc/hostname. As I said before, I have used /etc/hostname on other distros and it has picked it up fine.

Thank you for your suggestions. I’ll post back with the results.

It was my typo. It should be /etc/HOSTNAME

ckozler wrote:
> That isnt my first post either, ive posted in there before and no one
> has ever responded.

are you paying for support? are you getting the support you paid for?

are you expected to receive all your support from forums.novell.com
or isn’t there also an email or phone in support avenue?

i wouldn’t know the correct answer to any of those question…but, if
i had PAID for SLES you can bet i would know the answer to ALL of
them…and, if i didn’t get my money’s worth i’d move along (to red
hat or some other solution)


palladium
Ubuntu is an African word meaning “I can’t set up Debian.”

Why you don’t try the hostname command?

Yes you are correct!!! /etc/HOSTNAME( HOSTNAME- In Uppercase) it is very important to know. Thanks for you help!!!

Why did you even reply to this post??? It is 4 years old!