LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-11-2012, 02:17 AM   #1
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Rep: Reputation: 16
hostnames are not shown correctly after login


There is a server which runs dhcpd. Also there are some diskless clients which are booted from the server via network interface. In the dhcpd.conf I have defined:

Code:
group {
  filename "pxelinux.0";                 # PXE bootloader. Path is relative to /var/lib/tftpboot
  option root-path "192.168.1.1:/nfsroot";  # Location of the bootable filesystem on NFS server

  host node01 {
        fixed-address 192.168.1.2;  
        hardware ethernet 00:b0:81:f5:19:64; 
  }

  host node02 {
        fixed-address 192.168.1.3;
        hardware ethernet 00:b0:81:f5:32:49;
  }

  host node03 {
        fixed-address 192.168.1.4;
        hardware ethernet 00:b0:81:f5:31:94;
  }

  host node04 {
       fixed-address 192.168.1.5;
       hardware ethernet 00:b0:81:f5:32:4c;
  }

  host node05 {
       fixed-address 192.168.1.6;
       hardware ethernet 00:b0:81:f5:54:77;
  }

  server-name "srv1"; # Name of the server. Call it whatever you like.
  next-server 192.168.1.1;       # Server IP, as above.
}
I have also defined the names in /etc/hosts
Code:
127.0.0.1	localhost.localdomain localhost 
192.168.1.1     srv1
192.168.1.2     node01
192.168.1.3     node02
192.168.1.4     node03
192.168.1.5     node04
192.168.1.6     node05
There is no problem with ssh to node01 and node02 and node03. However when I ssh to node04 and node05, their hostnames are not shown.
Code:
mahmood@srv1:~$ ssh node04 
mahmood@node04 's password:
Linux orca 2.6.32-24-server #39-Ubuntu SMP Wed Jul 28 06:21:40 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.04 LTS

Welcome to the Ubuntu Server!
 * Documentation:  http://www.ubuntu.com/server/doc
Last login: Mon Jun 11 15:11:25 2012 from srv1
mahmood@srv1:~$ exit
logout
Connection to node04 closed.
mahmood@srv1:~$
srv1 in orange color should be node04

The same is true about node05. However there is not problem with other nodes. What is the problem and how can I fix that?

Last edited by mahmoodn; 06-11-2012 at 02:19 AM.
 
Old 06-11-2012, 02:38 AM   #2
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
I think in Ubuntu by default the dhclient doesn't change the hostname on the machine. You should most probably configure that yourself.
 
Old 06-11-2012, 02:40 AM   #3
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
Where?
I setup the other 3 nodes (which are fine) 1.5 years ago.
 
Old 06-12-2012, 01:58 AM   #4
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
I think is this 'request host-name', but not 100% sure, I dont usually use this.
 
Old 06-12-2012, 05:02 AM   #5
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Although it was working before, the “use-host-decl-names” in dhcpd.conf will distribute the hostname which is used for each entry by the server. Have the other 3 machines a hard coded hostname?
 
Old 06-12-2012, 05:25 AM   #6
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
ok i found that. In addition to dhcpd.conf in the server, I have to edit /etc/hosts in clients and define them there
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
While booting no option is shown for Linux! Only windows xp is shown!! mon avis Linux - General 7 08-06-2006 04:14 PM
FC5-2.6.16, with madwifi drivers for netgear Wg311T not being shown correctly kusanagi5eed Fedora 1 06-22-2006 03:07 AM
newb: can't login correctly as normal user eeyoree Linux - General 14 01-08-2005 01:39 PM
login name not cofigured correctly conno Slackware 7 03-09-2003 09:24 PM
The man pages are not shown correctly Stefan Moens Linux - Newbie 2 12-06-2002 12:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration