Hostname command issue

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Hostname command issue
# 1  
Old 09-02-2011
Hostname command issue

Hi All,

I am using redhat Linux 5.2.2 on vmware. I have created VM Machine using kickstart & rest 10 machines i created using vmware cloning.

On the base machine which i installed from kickstart its showing FQDN using hostname --fqdn but cloned machines are showing hosts name i have chnaged all the file which i know very well as below.
I chnaged ipaddress,hostname & MAC ID of the new system.

/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/hosts

I have provided FQDN in /etc/hosts file.

Can anyone suggests what can be the issue.

Regards

Ankit
# 2  
Old 09-02-2011
the fqdn option is somewhat nebulous... so if you're not using DNS and not use NIS then it will get the value (supposedly) from whatever you supplied in /etc/hosts. You can do strace -f hostname --fqdn to try to determine what it is trying to use.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

[SOLVED] Issue with hostname command

Hi, i'm having issues with one of my db servers, each time i run the hostname command i get "-a" as result this is the only zone on this server where i have this issue. could any one help me with this issue (5 Replies)
Discussion started by: EduardoDiaz
5 Replies

2. Red Hat

hostname command prints nothing a null value

Hi , On my box everything works fine. But whenever I run command It returns nothing as you see @(none) too. Its very strange issue I have never noticed on any other system yet. Any one have any idea about this. Thank you (2 Replies)
Discussion started by: pratapsingh
2 Replies

3. Emergency UNIX and Linux Support

df command for listing 90% + dirs and hostname condition

df -k | grep -v dcs |grep -v Filesystem| awk -F" " '{if(substr($5,0,length($5)-1)>87)print $5" " $6}' >> sms.txt 1) Is it the correct way to list all the filesystems > 90% 2) Is there any way to print hostname in this command ? The hostname should get printed in sms.txt file only when there... (9 Replies)
Discussion started by: ajaypatil_am
9 Replies

4. UNIX Desktop Questions & Answers

hostname in command prompt

Hello, all. Running 11.04. Is there a way that, in an ssh or telnet session, that hostname will not appear in the command prompt? Not logged in yet, so not seeking a user shell environment. I just want to see something like 'login>', not 'ubuntu login>'. ---------- Post updated at 07:50 PM... (3 Replies)
Discussion started by: mfearer
3 Replies

5. Emergency UNIX and Linux Support

HP UX - ILO Console hostname different than Machine Hostname...

Hi All, So we added a new HP-UX 11.31 machine. Copied OS via Ignite-UX (DVD)over from this machine called machine_a. It was supposed to be named machine_c. And it is when you log in...however when I'm in the ILO console before logging in, it says: It should say: What gives? And how do... (4 Replies)
Discussion started by: zixzix01
4 Replies

6. AIX

Command last displays wrong hostname

I faced an interesting problem on my AIX servers. When I checked last logins with command last I saw that hostnames are wrong. Let say, I made login from workstation xxxxx and with the command last I saw: root pts/2 yyyyy 5 jan 15:38 still logged in Ping xxxxx and ping... (3 Replies)
Discussion started by: giovanni
3 Replies

7. SCO

Possible hostname issue?

from the hostname command I get this: scosysv.mycompany0 when I ping scosysv.mycompany0 i get 64.158.xx.xx which fails with 100% packet loss. /etc/hosts shows 199.199.199.1 scosysv scosysv.mycompany0 scosysv.mycompany0.com when I ping the hostname value isn't the local IP 199.199.199.1... (6 Replies)
Discussion started by: bbxguy
6 Replies

8. Solaris

How to display hostname in command prompt

Anyone know How to configure solaris 8 to display hostname in command prompt , everytime when you open a terminal screen . (3 Replies)
Discussion started by: civic2005
3 Replies

9. UNIX for Dummies Questions & Answers

Solaris - unknown hostname - how can I change hostname?

Hello, I am new to Solaris. I am using stand alone Solaris 10.0 for test/study purpose and connecting to internet via an ADSL modem which has DHCP server. My Solaris is working on VMWare within winXP. My WinXP and Solaris connects to internet by the same ADSL modem via its DHCP at the same... (1 Reply)
Discussion started by: XNOR
1 Replies

10. UNIX for Advanced & Expert Users

Cisco Router command to get hostname

Hi All, I am connected to a cisco router and I want to know the hostname of this router. I connect as telnet <IPADDRESS> and the prompt shows vpnaccess-bristol> But I want to know the full hostname of the router how can i do that. When i type the hostname command the following... (3 Replies)
Discussion started by: rahulrathod
3 Replies
Login or Register to Ask a Question