Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sometimes my hostname automatically change to dhcppc[x]?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
quanta
n00b
n00b


Joined: 11 Sep 2010
Posts: 61

PostPosted: Sat Sep 11, 2010 3:34 pm    Post subject: Sometimes my hostname automatically change to dhcppc[x]? Reply with quote

Hi,

I am using KDE 4.4.5. Sometime, my hostname automatically change to dhcppc[x] with x random from 0 to 9.

My /ets/hosts file:
Code:
127.0.0.1   gentoo.homenetwork   gentoo   localhost

KDE configuration to start on boot:
Code:
quanta@dhcppc5 ~ $ cat /etc/conf.d/xdm
CHECKVT=7
DISPLAYMANAGER="kdm"
NEEDS_HALD="auto"


Contents in the ~/.kde4 folder:
Code:
$ ls .kde4/
Autostart      cache-dhcppc4  cache-gentoo     socket-dhcppc2  socket-dhcppc7    tmp-dhcppc1  tmp-dhcppc6
cache-dhcppc0  cache-dhcppc5  cache-localhost  socket-dhcppc3  socket-dhcppc9    tmp-dhcppc2  tmp-dhcppc7
cache-dhcppc1  cache-dhcppc6  share            socket-dhcppc4  socket-gentoo     tmp-dhcppc3  tmp-dhcppc9
cache-dhcppc2  cache-dhcppc7  socket-dhcppc0   socket-dhcppc5  socket-localhost  tmp-dhcppc4  tmp-gentoo
cache-dhcppc3  cache-dhcppc9  socket-dhcppc1   socket-dhcppc6  tmp-dhcppc0       tmp-dhcppc5  tmp-localhost


Why did KDE create so many files? It seems to be KDE cache?

I also tried with xfce + slim, it shows the warning below after logining:
Quote:
Could not look up internet address for dhcppc2.
This will prevent Xfce from operating correctly.
It may be possible to correct the problem by adding
dhcppc2 to the file /etc/hosts on your system.


Appending dhcppc2 at the end of 'localhost' line in /etc/hosts solved this problem. But why my hostname automatically change to dhcppc[x]? Does anyone have any info on this?
Back to top
View user's profile Send private message
Kobboi
l33t
l33t


Joined: 29 Jul 2005
Posts: 672
Location: Belgium

PostPosted: Sat Sep 11, 2010 5:10 pm    Post subject: Reply with quote

Capture the DHCP communication with Wireshark. I guess the server is sending a hostname to your DHCP client, and that that client is configured to use that hostname on your system.
Back to top
View user's profile Send private message
quanta
n00b
n00b


Joined: 11 Sep 2010
Posts: 61

PostPosted: Sun Sep 12, 2010 4:47 am    Post subject: Reply with quote

Kobboi wrote:
Capture the DHCP communication with Wireshark. I guess the server is sending a hostname to your DHCP client, and that that client is configured to use that hostname on your system.

Thank you, you are right.
Code:
tcpdump -vv -s0 -i wlan0 port bootps

give me the following info:
Quote:
Option: (t=53,l=1) DHCP Message Type = DHCP ACK
Option: (t=1,l=4) Subnet Mask = 255.255.255.0
Option: (t=3,l=4) Router = 192.168.1.1
Option: (t=6,l=4) Domain Name Server = 192.168.1.1
Option: (t=12,l=7) Host Name = "dhcppc4"
Option: (t=15,l=1) Domain Name = ""
Option: (t=58,l=4) Renewal Time Value = 1 day, 12 hours
Option: (t=59,l=4) Rebinding Time Value = 2 days, 15 hours
Option: (t=51,l=4) IP Address Lease Time = 3 days
Option: (t=54,l=4) DHCP Server Identifier = 192.168.1.1


Remove the host_name at the end of line "option domain_name_servers, domain_name, domain_search, host_name" or append "nohook 30-hostname" solved this problem:
Code:

$ cat /etc/dhcpcd.conf
option domain_name_servers, domain_name, domain_search
option ntp_servers
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum