Hostname

Hi guys,
I’ve a little trouble: I reinstalled on my notebook OpenSUSE 11.3 yesterday and I’m unable to change the hostname.
I modified it, but when I type on terminal

uname -a

it doesn’t give the right answer but returns

host 

I don’t know where I wrong because I did this action many times with Opensuse 11.1 and 11.3 without any problem.

Thanks a lot to everybody

show us a screen of a open terminal window

What does this give you

cat /etc/HOSTNAME
 
dezzo@host:~> cat /etc/HOSTNAME
linux-y9pw.site
dezzo@host:~>

that is the right hostname.

This does the trick to change it, you won’t see it until next login:


su -c hostname YOURHOSTNAMEHERE

On 04/10/2011 08:36 PM, dezzo wrote:
> uname -a
> it doesn’t give the right answer but returns
> host

try uname -a again, it should not return anything like “host”…
instead it should look more like:


Linux openSUSE11-3 2.6.34.7-0.7-default #1 SMP 2010-12-13 11:13:53 +0100
i686 athlon i386 GNU/Linux

if it is just returning “host” you have more problems than i can fathom…


CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.3 + KDE4.5.5 + Thunderbird3.1.8]
Maybe the developers are not here because they are so busy fixing these>
http://tinyurl.com/392jnb

I tried it yesterday night when I came back home. but it didn’t work…I can’t remember exactly what was wrong.

I’ll try again this evening after work.

Thanks for your support

I’d like to set my hostname as linux-y9pw.

following your advice…

 su -c hostname linux-y9pw 

gives back

 l'utente linux-y9pw non esiste (in English: user linux-y9pw does not exist) 

I also tried to modify as super user the file HOSTNAME:

 gedit /etc/HOSTNAME 

but it doesn’t seem to work correctly because the command

 uname -a 

gives

 Linux host 2.6.34.7-0.7-default #1 SMP 2010-12-13 11:13:53 +0100 i686 i686 i386 GNU/Linux 

Who can help me??

However thanks to everybody (and sorry for my bad english too)

Just out of interest
What username did you use when doing the install ?

Can you disable auto login
Disable Auto-Login

And at the login screen
Do you see your user name there?
If not, type it in the user login field
followed by your password.

Report back

User full name: Ing Dezzo
Username: dezzo

By disabling the auto-login I can see my “user full name” and by typing the pw, I enter correctly, but nothing changes…:frowning:

…if it could be useful, this is the content of /etc/hosts:


#
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.
# Syntax:
#    
# IP-Address  Full-Qualified-Hostname  Short-Hostname
#

127.0.0.1	host	localhost.localdomain	localhost

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet

ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts
127.0.0.2       linux-brss.site linux-brss

while the content of /etc/HOSTNAME is:

linux-y9pw.site

I’m a bit confused…

Thanks again!!

Here is mine

#
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.
# Syntax:
#    
# IP-Address  Full-Qualified-Hostname  Short-Hostname
#

127.0.0.1       localhost

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet

ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts
127.0.0.2       G550-114.site G550-114

Are you sure you haven’t imported some files from another install like Fedora? It looks Fedoraish to me:
localhost.localdomain

In openSUSE,
You have to configure your Hostname properly in TWO places in YAST

  • The Hosts file
    YAST > Network Services > Hostnames
  • The Network Configuration
    YAST > Network Devices > Network Settings > Hostname/DNS tab
    (Be certain that the “Change Hostname via DHCP” is <unchecked> or as it says DHCP will change how you’re seen on the Network no matter what your local settings are.

HTH,
Tony

(Be certain that the “Change Hostname via DHCP” is <unchecked> or as it says DHCP will change how you’re seen on the Network no matter what your local settings are.

Resolved!!!lol!

I fell stupid… it was so easy…

Thanks a lot to everybody!!!

Dezzo