Note that there are some explanatory texts on larger screens.

plurals
  1. POAny way to replace a DNS Server address in my /etc/resolv.conf using python in Ubuntu 12.04?
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COIt's not clear what you're trying to do here. You mention `resolv.conf`, which is for configuring your resolver, but doesn't typically have anything to do with "dns entries". There are a variety of DNS servers out there, several of which support dynamic updates. What is your server? Python can of course modify files; there are lots of examples out there demonstrating basic file i/o. If your server supports DNS updates via DDNS, you can use the `nsupdate` command.
      singulars
    2. COSorry, that is what I meant, I want to modify my resolver @larsks . I will update my question so that it is clearer thank you. Can you tell me any way to modify a file without having to delete the original and replacing it with one with the same name please? I am not using a server, It is just a laptop in kiosk mode running an app, and I want this app to modify that file.
      singulars
    3. COI'm not clear on something: do you actually have permission to modify this file? Because if you don't, you're pretty much stuck. Typically, only the `root` user can modify this file. Also, if you could update your question to show exactly what you want do do (e.g., initial state and desired end state) we can probably be more helpful.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload