1
Working in linux environment, Python 2.7, and I am in need of a module/library in Python that allows me to change the network settings (IP, Subnet, Gateway and, if possible, primary and secondary DNS).
I checked some libraries (netaddr
, ipaddress
, netifaces
, IPy
), but they only allowed me to read and do checks with the network card data (I was able to extract this information and show on the screen), but none allows me to make changes to this information.
My software should allow the user to have the option to leave the static IP on the machine, and to run the os.system("")
to change via terminal, I would need to be logged in as root.
If anyone knows any way to make this kind of change, I’ll be eternally grateful.
I may be mistaken, but I believe that even if you find a library that does this you will still need to be logged in as root, since it will make a change in the system.
– Luiz Vieira
That’s right. But I wanted to manipulate this information from inside Python, but I guess I’ll have to call the library 'os' anyway...
– Anderson Marques Barbosa