Find the answer to your Linux question:
Results 1 to 9 of 9
Hey all, Yesterday I was toying around with lvm to try and move some directories to new partitions. After tooling around all day I finally got it working, but along ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2012
    Posts
    4

    root@(none) problems with host name


    Hey all,

    Yesterday I was toying around with lvm to try and move some directories to new partitions. After tooling around all day I finally got it working, but along the way I seem to have messed up my hostname.

    So now for all users hostname is coming up as
    username at (none)

    I have been researching this all morning so here is the information I think will be useful.

    #cat /etc/hosts
    127.0.0.1 das017 localhost.localdomain localhost
    ::1 localhost6. localdomain6 localhost
    10.48.140.XXX puppet

    #cat /etc/hostname

    Empty File

    When I type
    [root at (none) /]# hostname
    [root at (none) /]#

    returns nothing

    I noticed this problem when I tried to start our httpd

    [root at (none) /]#/sbin/service http start
    Starting httpd: httpd: apr_sockaddr_info_get() failed for (none)
    httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [FAILED]

    [root at (none) /]#



    So I think what my main issue is having to do with the hostname?


    *EDIT - Adding Info

    [root at (none) /]# cat /etc/sysconfig/network
    NETWORKING=yes
    NETWORKIGN_IPV6=yes
    GATEWAY=10.48.140.1
    HOSTNAME=localhost

    Any suggestions?
    Thanks!!
    Last edited by djc391; 04-04-2012 at 05:26 PM. Reason: Adding Info

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    Use the Google luke.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Apr 2012
    Posts
    4
    I searched for about 6 hours today with no luck. Stuff I did find I tried. That's why I am asking here.

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    Really? It is not that hard just google what you want to do like THIS

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  5. #5
    Just Joined!
    Join Date
    Apr 2012
    Posts
    4
    Tried the first 10 links of that search all ready. None of that works. You might be thinking I'm just being lazy here, but I have really googled the crap out of this already. That's why I am asking humans, hopefully someone might be able to have some more knowledge then the first 3 google results about this?

    Thanks for at least trying Lazydog, but no matter what way I try and set the hostname nothing works.

    [root at (none) /]# hostname localhost
    [root at (none) /]# hostname
    [root at (none) /]#

  6. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    Code:
    vi /etc/sysconfig/network
    Place your hostname after HOSTNAME

    Then run;

    Code:
    hostname <hostname>
    Replacing <hostname> with the name you want to use.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  7. #7
    Just Joined!
    Join Date
    Apr 2012
    Posts
    4
    Copy from original post
    [root at (none) /]# cat /etc/sysconfig/network
    NETWORKING=yes
    NETWORKIGN_IPV6=yes
    GATEWAY=10.48.140.1
    HOSTNAME=localhost

    I have reset that value to localhost numerous times
    and have also tried to reset it again using

    [root at (none) /]# hostname localhost
    [root at (none) /]# hostname
    [root at (none) /]#


    I think I am just going to reformat the server tomorrow, this is not a simple issue that one can simple just google in 20 mins(spent another 4 hours today working on it) and has stumped all of my coworkers. Was hoping someone would have some good trick, but just doing what the first reply on google says isn't going to fix it.

    Thanks for trying Lazydog.

  8. #8
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    Does the system hold the hostname when you enter it with hostname <hostname>?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  9. #9
    Just Joined! ifechi's Avatar
    Join Date
    Apr 2012
    Posts
    11
    Hi djc391,

    Just use the echo command to replace the contents of /proc/sys/kernel/hostname with your new host name.

    Code:
    # echo hostname.com > /proc/sys/kernel/hostname
    Then restart the network interfaces:

    Code:
    # service network restart
    Now you can use the 'hostname' command to verify that it has changed.

Posting Permissions

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