LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-11-2014, 10:42 PM   #16
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,150

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783

I probably got the process mixed up a bit but the client still sends the name to the server using the send host-name directive.

If your using DHCP then check the dhclient running process i.e.on one of my CentOS boxes. -cf /var/run/nm-dhclient-eth1.conf which contains send host-name "hostname" How else does the server set the name if it does not get it from the client?
 
Old 06-12-2014, 11:57 AM   #17
blackRonin
Member
 
Registered: Jun 2014
Distribution: CentOS 6.5
Posts: 55

Original Poster
Rep: Reputation: Disabled
I'm not using eth, just wlan
so i dont have /etc/sysconfig/network-scripts/ifcfg-eth0 or ifcfg-wlan0


My /etc/resolv.conf is
Quote:
# Generated by NetworkManager
domain home
search home
nameserver 192.168.1.254
My vim /var/run/nm-dhclient-wlan0.conf :
Quote:
# Created by NetworkManager

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
option ms-classless-static-routes code 249 = array of unsigned integer 8;

also request rfc3442-classless-static-routes;
also request ms-classless-static-routes;
also request static-routes;
also request ntp-servers;

I also want to tell that.
Recently i installed KDE, and removed it.
But after that, my hostname was changed to new-host.
And the router see it also.

How to change that ?
Where was that change made ?
 
Old 06-12-2014, 12:34 PM   #18
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,410
Blog Entries: 1

Rep: Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115
you can look under the /etc/NetworkManager directory to find the config files for NetworkManager.
 
Old 06-12-2014, 12:51 PM   #19
blackRonin
Member
 
Registered: Jun 2014
Distribution: CentOS 6.5
Posts: 55

Original Poster
Rep: Reputation: Disabled
Networkmanager config shows
root@new-host:~# cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifcfg-rh


and that's it.
 
Old 06-13-2014, 09:54 AM   #20
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,581

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
dont use both network manager and the ifcfg-eth0 file. they will conflict. remove the network manager.
 
1 members found this post helpful.
Old 06-14-2014, 04:49 PM   #21
blackRonin
Member
 
Registered: Jun 2014
Distribution: CentOS 6.5
Posts: 55

Original Poster
Rep: Reputation: Disabled
Dear @lieb which both ?
I'm currently using only NM .
I don't have ifcfg-eth0

I see:
Code:
root@new-host:~# vim /etc/sysconfig/network-scripts/
ifcfg-lo                ifdown-post             ifup-bnep               ifup-post               net.hotplug
ifdown                  ifdown-ppp              ifup-eth                ifup-ppp                network-functions
ifdown-bnep             ifdown-routes           ifup-ippp               ifup-routes             network-functions-ipv6
ifdown-eth              ifdown-sit              ifup-ipv6               ifup-sit                
ifdown-ippp             ifdown-tunnel           ifup-isdn               ifup-tunnel             
ifdown-ipv6             ifup                    ifup-plip               ifup-wireless           
ifdown-isdn             ifup-aliases            ifup-plusb              init.ipv6-global
Btw. why my hostname was changed ? i don't understand that.
 
Old 06-17-2014, 04:42 PM   #22
blackRonin
Member
 
Registered: Jun 2014
Distribution: CentOS 6.5
Posts: 55

Original Poster
Rep: Reputation: Disabled
bump. please help
 
Old 06-18-2014, 07:24 AM   #23
tairoylance112
LQ Newbie
 
Registered: Jun 2014
Posts: 4

Rep: Reputation: 0
There are several ways to do that but I am using the old way. VI is my friend and still working. I am using a remote SSH session to one of my virtual machines but you can perform same steps from the console.
Login with putty.exe
Goto /etc/sysconfig/
Type vi network
Press i on the keyboard and change the HOSTNAME to your preferred servername
Press ESC on the keybord
Save the configuration by :wq!
Log off or reboot
- See more at: http://www.networknet.nl/apps/wp/arc....DF2rDPMj.dpuf
 
Old 06-18-2014, 04:09 PM   #24
blackRonin
Member
 
Registered: Jun 2014
Distribution: CentOS 6.5
Posts: 55

Original Poster
Rep: Reputation: Disabled
tairoylance112, i know this method.
But it's not working for me.

When i changed hostname in /etc/sysconfig/network
I see changes only on that machine.

Router and another computers in network see old hostname (new-host etc.)
 
Old 06-19-2014, 12:24 AM   #25
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 353

Rep: Reputation: Disabled
I totally lost my post...

BR: We have helped you as much as we can, I'm afraid. Make the changes CONSISTENTLY in the places we've told you to make them:

- bash prompt: hostname [hostname]
- /etc/sysconfig/networking: HOSTNAME=[hostname]
- /etc/hosts: put your hostname/FQDN in the FIRST position, not the last. Like so...

# cat /etc/hosts
127.0.0.1 [hostname] [hostname.domain] localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

When monkeying around with DNS or hostnames-things that are affected by sessions and whatnot-reboot after the changes are made.
 
Old 06-22-2014, 11:14 AM   #26
blackRonin
Member
 
Registered: Jun 2014
Distribution: CentOS 6.5
Posts: 55

Original Poster
Rep: Reputation: Disabled
I want to wait for solution coz my problem get more weirder.

I looked that, linux centos, after connecting to wifi using new adapter (alfa awus036nha)
Inherit windows 7 hostname.

Please look here;
Quote:
peter@new-host:~$ su -
Password:
root@new-host:~# logout
(and now i disconnecting bulit-in wifi adapter, connecting alfa) and issue su - command
peter@new-host:~$ su -
Password:
root@Peter-Computer:~#
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
'hostname some_name' does not change the hostname. stf92 Slackware 11 02-21-2013 08:09 PM
getting errors related to hostname -- security problem? ok to change hostname? sneakyimp Linux - Server 2 11-18-2012 06:25 PM
Centos 6 - machine does not know it's own hostname yanom Red Hat 1 07-18-2012 01:21 AM
change hostname of LINUX CentOS 5 while running informix server ytd Linux - General 5 08-11-2009 02:04 AM
after hostname change, syslogd still output previous hostname to messages file tiger2000 Linux - General 3 07-22-2009 10:36 PM


All times are GMT -5. The time now is 11:21 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration