Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Change Hostname

  1. #1

    Default Change Hostname

    Hi there,

    a few minutes ago I installed openSUSE on my notebook with an usb drive using openSUSE 11.4 KDE LIVE iso.
    The installation process set the name to "linux-ygrl" which I don't really like. (I probably just missed the setting during the installation....)
    I tried to change it through YaST -> Network Services -> Hostnames and I set everything where needed to the new name and restarted but the changed weren't applied. I searched the web and found out about the /etc/HOSTNAME file which still contains "linux-ygrl". Now I could change it manually but I was wondering if there is a GUI for it? (I mean, openSUSE has for alsmost everything a GUI... :S)


    Thanks

  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Change Hostname

    To change your PC Hostname, Goto:

    YaST / Network Services / Hostnames and find it as an aliias. Mine shows up on the 127.0.0.2 line. I can select it and then press the Edit button on the bottom left and modify the Host Alias, press OK and then press OK again. You can also get to this same name from:

    YaST / Network Devices / Network Settings / Press OK to the warning if you have set NetworkManager to control your network / Hostname/DNS Tab / Hostname and press OK if you make a change there.

    The way mention 1st would be the best way to make this change. If you are using Samba, I do not recommend you make your Hostname the same as your netbios name which should be different.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  3. #3

    Default Re: Change Hostname

    If I change this, /etc/HOSTNAME stays as it is and the OS still uses the old hostname e.g. for DHCP.

    Any other ideas?

  4. #4
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Change Hostname

    Ctwx
    If I change this, /etc/HOSTNAME stays as it is and the OS still uses the old hostname e.g. for DHCP.

    Any other ideas?
    Did you restart your PC after making this change using YaST as suggested?

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  5. #5
    Join Date
    Dec 2008
    Location
    Montgomery, AL
    Posts
    64

    Default Re: Change Hostname

    Perhaps check that change Hostname via DHCP isn't checked on the Hoastname/DHCP tab of network settings in yast.

  6. #6
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,131

    Default Re: Change Hostname

    On Fri April 1 2011 06:36 pm, jdmcdaniel3 wrote:


    <snip>
    >
    > The way mention 1st would be the best way to make this change. If you
    > are using Samba, I do not recommend you make your Hostname the same as
    > your netbios name which should be different.
    >
    > Thank You,
    >

    jdmcdaniel3;

    Can you give one good reason why the netbios name and hostname should differ.
    The only problem that can crop up is having a hostname longer than 15
    characters or characters not supported by netbios [not unicode letters
    numerals, white spaces nor !@$%^&')(.-_{}~ ].

    --
    P. V.
    "We're all in this together, I'm pulling for you." Red Green

  7. #7
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Change Hostname

    Can you give one good reason why the netbios name and hostname should differ.
    The only problem that can crop up is having a hostname longer than 15
    characters or characters not supported by netbios [not unicode letters
    numerals, white spaces nor !@$%^&')(.-_{}~ ].
    Yes I have had issues where a Windows computer would not connect to a Linux machines where the two names where the same and other oddities. My suggestion is based on these issues and I did state that it was recommended, not required. If you do not really use Samba or your have both names already set the same and have no problem, then you are fortunate or your usage of Samba is limited in some way. I have had the same questions posed before and I give the same answer. To avoid possible Samba issues, it is not unreasonable to use a different Linux Hostname or to continue using the name you were given during the installation of openSUSE, which is my normal thing to do.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  8. #8
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,131

    Default Re: Change Hostname

    On Fri April 1 2011 08:36 pm, jdmcdaniel3 wrote:

    >
    >> Can you give one good reason why the netbios name and hostname should
    >> differ.
    >> The only problem that can crop up is having a hostname longer than 15
    >> characters or characters not supported by netbios [not unicode letters
    >> numerals, white spaces nor !@$%^&')(.-_{}~ ].Yes I have had issues where a

    Windows computer would not connect to a
    > Linux machines where the two names where the same and other oddities.
    > My suggestion is based on these issues and I did state that it was
    > recommended, not required. If you do not really use Samba or your have
    > both names already set the same and have no problem, then you are
    > fortunate or your usage of Samba is limited in some way. I have had the
    > same questions posed before and I give the same answer. To avoid
    > possible Samba issues, it is not unreasonable to use a different Linux
    > Hostname or to continue using the name you were given during the
    > installation of openSUSE, which is my normal thing to do.
    >
    > Thank You,
    >

    jdmcdaniel3;

    By default Samba will use the hostname for the Netbios name, you would only
    have two names for the linux machine if you CHANGED the Netbios name to
    something else. You have this backwards. There is absolutely no harm leaving
    them the same.

    Windows will also use the same name for the hostname and Netbios name. Newer
    windows machines (AD)like to use DNS rather than Netbios for name resolution.
    By leaving them the same names can be looked up by broadcast, wins or DNS and
    they all resolve to the same machine. We have multiple linux servers for our
    Windows Domain and never a problem.
    --
    P. V.
    "We're all in this together, I'm pulling for you." Red Green

  9. #9
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Change Hostname

    By default Samba will use the hostname for the Netbios name, you would only
    have two names for the linux machine if you CHANGED the Netbios name to
    something else. You have this backwards. There is absolutely no harm leaving
    them the same.

    Windows will also use the same name for the hostname and Netbios name. Newer
    windows machines (AD)like to use DNS rather than Netbios for name resolution.
    By leaving them the same names can be looked up by broadcast, wins or DNS and
    they all resolve to the same machine. We have multiple linux servers for our
    Windows Domain and never a problem.
    So you say. But, do you have Samba loaded on your Machine? Is your Netbios Name the same as its Hostname? Can you show your configuration files to prove this? Like so:

    /etc/HOSTNAME

    linux-l9oq.site
    /ect/samba/smb.conf

    Code:
    # Samba config file created using SWAT
    # from UNKNOWN (127.0.0.1)
    # Date: 2011/03/14 21:08:05
    
    [global]
        workgroup = WINDOWSNT
        netbios name = MASTERLINUX
        server string = The Master of the Universe
        security = SHARE
        map to guest = Bad Password
        socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
        printcap name = cups
        logon path = \\%25L\profiles\.msprofile
        logon drive = P:
        logon home = \\%25L\%25U\.9xprofile
        local master = No
        domain master = No
        wins support = Yes
        ldap ssl = no
        usershare allow guests = Yes
        usershare max shares = 100
        hosts allow = 192.168.0.0/255.255.255.0, 127.0.0.1
        hosts deny = ALL
        cups options = raw
        posix locking = No
        ldap suffix = 
        passdb backend = smbpasswd
    
    [Software]
        path = /Software
        read only = No
        acl check permissions = No
        inherit acls = Yes
        guest ok = Yes
        profile acls = Yes
    
    [Windows]
        path = /Windows
        read only = No
        acl check permissions = No
        inherit acls = Yes
        guest ok = Yes
        profile acls = Yes
    Here is a listing of my local PC's using Samba in Linux:

    Code:
    smb://james-pc/
    smb://jamie-pc/
    smb://linuxmaster/
    smb://masterlinux/
    smb://mctronics/
    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  10. #10
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,131

    Default Re: Change Hostname

    On Fri April 1 2011 09:36 pm, jdmcdaniel3 wrote:
    <snip>
    >
    > But, do you have Samba loaded on your Machine? Is your
    > Netbios Name the same as its Hostname? Can you show your configuration
    > files to prove this? Like so:
    >

    <snip>
    > Thank You,
    >

    jdmcdaniel3;
    The domain name has been changed to protect the guilty.

    As Swat will only show the parameters that are set the smb.conf, testparm -v
    will give all the parameters including the default parameters. fermat is a
    member server of a Samba3 Domain and running OpenSuse 11.4, Samba 3.5.8. Hal2
    is an OpenSuse 10.2 running Samba 3.5.8 (Binaries from Sernet) and is the PDC


    venxyz@fermat:~> cat /etc/HOSTNAME
    fermat.XXXXXX

    venxyz@fermat:~> testparm -vs
    Load smb config files from /etc/samba/smb.conf
    <snip>
    Loaded services file OK.
    Server role: ROLE_DOMAIN_MEMBER
    [global]
    dos charset = CP850
    unix charset = UTF-8
    display charset = LOCALE
    workgroup = XXXXXX
    realm =
    netbios name = FERMAT
    netbios aliases =
    netbios scope =

    venxyz@fermat:~> nslookup fermat
    Server: 192.168.0.25
    Address: 192.168.0.25#53

    Name: fermat.XXXXXX
    Address: 192.168.0.26

    venxyz@Hal2:~> cat /etc/HOSTNAME
    Hal2.XXXXXX

    venxyz@Hal2:~> testparm -vs
    Load smb config files from /etc/samba/smb.conf

    <snip>

    Loaded services file OK.
    Server role: ROLE_DOMAIN_PDC
    [global]
    dos charset = CP850
    unix charset = UTF-8
    display charset = LOCALE
    workgroup = XXXXXX
    realm =
    netbios name = HAL2
    <snip>

    venxyz@Hal2:~> nslookup hal2
    Server: 192.168.0.25
    Address: 192.168.0.25#53

    Name: hal2.mshome
    Address: 192.168.0.25

    Here are the clients/servers on line at this time, during the day there are a
    lot more:
    venxyz@Hal2:~> smbtree
    Enter venzke's password:
    XXXXXX
    \\VAL Windows XP
    <snip>
    \\TEEN1
    <snip>
    \\PAL
    <snip>
    \\HP0025B3A2FCC8
    <snip> {note this is actually a network printer}
    \\HAL2 Samba 3.5.8
    <snip>
    \\GAUSS Windows 7
    <snip>
    \\FERMAT Samba on fermat
    <snip>
    venzke@Hal2:~>

    --
    P. V.
    "We're all in this together, I'm pulling for you." Red Green

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •