Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: /etc/hosts is not evaluated after modification on Linux

by philipbailey (Deacon)
on May 30, 2015 at 21:11 UTC ( #1128426=note: print w/replies, xml ) Need Help??

in reply to /etc/hosts is not evaluated after modification on Linux

As Corion says, it sounds like a caching issue. On SLES, it is likely you have an nscd daemon running, which is responsible for caching this data. According to the documentation, running this command after changing /etc/hosts will invalidate the cache and should resolve your problem, I think:

sudo nscd -i /etc/hosts

Replies are listed 'Best First'.
Re^2: /etc/hosts is not evaluated after modification on Linux
by Anonymous Monk on May 31, 2015 at 06:22 UTC
    Indeed, following helps: system("/usr/sbin/nscd", "-i", "hosts"); Thanks a lot! -Vadim

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1128426]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2022-01-17 15:56 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (51 votes). Check out past polls.