/etc/hosts on Ubuntu behaving strangely


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users /etc/hosts on Ubuntu behaving strangely
# 1  
Old 04-28-2008
/etc/hosts on Ubuntu behaving strangely

Hy guys, I'm having a very strange problem, every time I change the /etc/hosts file on an Ubuntu machine @ work, every time I change the line:
Code:
127.0.0.1 programmer.COMPANY

to
Code:
127.0.0.1 programmer.COMPANY programmer

It works till the next reboot, now, I have never experienced this on any of my Linux machines, does anyone may have a clue on what's happening?

Thanks.
# 2  
Old 04-29-2008
I've never had Ubuntu or Debian child, but it may be that another script, loaded at startup is cleaning the /etc/hosts and/or other system files. Such scripts/lines of code are usually located at /etc/rc.local file, or /etc/init.d/. Got root ? Anyone else ?
# 3  
Old 04-29-2008
There's no local script doing this, I can't imagine this NOT being Ubuntu stuff, could be the winbind I've installed for talking with the AD following this tutorial.
I really have no ideia what can be doing this.
# 4  
Old 04-29-2008
Do you find a script in /etc/init.d or someplace which messes with /etc/hosts? (I don't, not in /etc/network or /etc/init.d .)

Mine looks like it was last modified on 2008-03-28 which might have been the last time I used DHCP. I don't have any real grip over what Avahi does but if you use Network Manager with roaming mode, this is the sort of thing it does, I believe.

locate avahi | fgrep hosts brought up two matches which look sort of promising: /etc/avahi/hosts and the avahi.hosts manual page.
# 5  
Old 10-30-2008
If you are using using DHCP...

It is prbly getting over written at each reboot or DHCP refresh (like once a day, week ) when the DHCP lease ends...

Matt
ThePartTimeCTO.com
# 6  
Old 11-04-2008
172.0.0.1 is the standard TCP/IP loopback address. Same on unix and Windows.
A normal line is
127.0.0.1 localhost loopback
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to copy a tar file on a series of remote hosts and untar it on those hosts?

Am trying to copy a tar file onto a series of remote hosts and untar it at the destination. Need to do this without having to do multiple ssh. Actions to perform within a single ssh session via shell script - copy a file - untar at destination (remote host) OS : Linux RHEL6 (3 Replies)
Discussion started by: sankasu
3 Replies

2. UNIX for Advanced & Expert Users

[Solved] wc behaving weirdly

Can anyone explain why wc is behaving weirdly? Their are only 2 occurrences but wc thinks their are 7 occurrences. I have even manually checked this. $ grep -i base * lit: base xx lit.lst:003- 00103 BASE XX $ grep -i base * | wc -w ... (2 Replies)
Discussion started by: cokedude
2 Replies

3. AIX

aix tcp wrappers hosts.allow hosts.deny?

hi all just installed the netsec.options.tcpwrapper from expansion pack, which used to be a rpm, for my aix 6.1 test box. it is so unpredictable. i set up the hosts.deny as suggested for all and allow the sshd for specific ip addresses/hostnames. the tcpdchk says the hosts allowed and... (0 Replies)
Discussion started by: wf201626
0 Replies

4. Shell Programming and Scripting

Grep command behaving strangely

Hi, I need to count number of '$' symbol in a file and assign it to a variable. I am using below command. grep -c '\$' inputfile O/p: 10359 Its giving correct o/p but when I am assigning the same to a variable its giving completely different o/p. ab1=`grep -c '\$' inputfile` $... (3 Replies)
Discussion started by: Opamps123
3 Replies

5. Red Hat

nslookup behaving strangely

I have two servers on same domain. one can nslookup other cannot Psu100 can lookup to psu000, psu010 & psu011 Psu110 can NOT lookup to psu000, psu010 & psu011 I verified resolv.conf entries on both psu000 and psu010 and it contains both name servers (10.200.10.21 & 10.200.11.22).I am... (1 Reply)
Discussion started by: scorohan
1 Replies

6. Shell Programming and Scripting

Loop Forever Script Strangely Exiting

Hi, I have a really simple script which I want to run forever, inside the loop it runs a C application which if it exits should restart. #!/bin/sh while true do ./SCF scf.conf >> scf.log sleep 2 done For some reason the SCF C application coredumps and the script is exiting.... (3 Replies)
Discussion started by: marvinwright
3 Replies

7. IP Networking

Issue with /etc/hosts file under ubuntu

I think terminal outpu is better than long words so: I rebooted my laptop but no success... It's the same for all entry i added... Any ideas ? PS: I'm under ubuntu 9.0.4 edit: hostnames can't start with a number, using c4507 for example works. (0 Replies)
Discussion started by: nekkro-kvlt
0 Replies

8. UNIX for Dummies Questions & Answers

Hosts.allow and hosts.deny

Hello everyone, This is my first posts and I did search for a questions but did not find a question that answered my question unless of course I overlooked it. I'm running Solaris 8. I use ssh for the users but I have a user called "chatterbox" that uses telnet but I need for chatterbox to... (1 Reply)
Discussion started by: huddlestonsnk
1 Replies

9. UNIX for Advanced & Expert Users

csplit not behaving

I have a large file with the first 2 characters of each line determining the type of record. type 03 being a subheader and then it will have multiple 04 records. eg: 03,xxx,xxxx,xxxx 04,xxxxxxxxxxxxxxxxxxxxxxxxxxxx 04,xxxxxxxxxxxxxxxxxxxxxxxxxxxx 03,xxx,xxx,xxx ... (2 Replies)
Discussion started by: badg3r
2 Replies

10. UNIX for Dummies Questions & Answers

hosts.allow & hosts.deny

Hi! Im trying to use host.allow & host.deny to resrtic access to my sun machine, but it doesnt seem to work... I want to allow full access from certain IPīs (ssh,http,ftp,etc...) but deny all kind of conections from outsideworld, the way that im doing that is: hosts.allow ALL:127.0.0.1... (2 Replies)
Discussion started by: Sorrento
2 Replies
Login or Register to Ask a Question