No ability to define hosts aliases

Hi

I am trying to made two things :

  1. add ability to ping my computer using hostname
  2. add several aliases to different IP addresses so I will be able to ping them by this aliases

But I face with strange behavior that I didn’t see on any other distro that I used to work with before : /etc/hosts file erased after each restart so usual for me way don’t work here . No problem , I tried to use opensuse specific ways (Yast) . But any actions within Network Services -> Hostnames also live only until restart . Changes within Network Devices -> Network Settings persists , but hostname resolution to 127.0.0.2 work also only till restart :frowning:

Could anyone please advise me how I can solve my two goals ?

On 2012-09-24 23:46, edrozim wrote:
> /etc/hosts file erased after each
> restart so usual

I have never seen that behaviour.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Maybe you have any ideas where I could dig in to try to understand this issue ?

I have never had that problem, either.

Are you running some special software (VPN or DSL) that might perhaps be doing that erasure?

On 2012-09-25 00:26, edrozim wrote:
>
> Maybe you have any ideas where I could dig in to try to understand this
> issue ?

Are you running the live cd, perhaps?


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Hi edrozim

Which version of openSUSE are you using?

Do you connect using ifup or via Network Manager?

First of all thank you all for trying to help me!

Now answering on all your questions in one post :

Are you running some special software (VPN or DSL) that might perhaps be doing that erasure?

I have cisco anyconnect client but I am not touching it during this time and I am sure that I don’t have it in autostart

Are you running the live cd, perhaps?

No, it is not live cd for sure

Which version of openSUSE are you using?

# cat /etc/issue
Welcome to openSUSE 12.2 "Mantis" - Kernel \r (\l).

also I always install latest updates

Do you connect using ifup or via Network Manager?

while trying to “beat” this issue I change a lot of stuff within Yast->System-> /etc/sysconfig Editor
among them enable/disable Network Manager . So answer is - problem persists for both cases

Remember,
You when you make changes to the Hosts file (using YAST preferably), you also need to make corresponding changes in the Network Device settings… Not only, but most important to disable the option for DHCP to change your machine’s hostname on the network.

HTH,
TSU

On 2012-09-25 17:26, edrozim wrote:
> So answer is - problem
> persists for both cases

There is a trick using apparmour to deny and log attempts to modify a certain file. If you wish
to try this I’ll search for the recipe.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)