Comment 99 for bug 259214

Revision history for this message
Bassu Khan (bashukhan) wrote :

>use resolvconf to setup defaults ... or use the connection editor to
>set your custom DNS/gw ... its a bit tricky, b ut it works.
> - Alexander

I already achieved the goal without using resolvconf or by editing the custom dns/gw because I don't want to remove NetworkManager

Here is how i did it. I simply put my username into `no pass required for global group` section of sudoers and added that group to /etc/sudoers:

# Members of the admin group may gain root privileges
%abbas ALL= NOPASSWD: /bin/chmod, /sbin/reboot, /sbin/halt, /sbin/poweroff
sudo ALL=NOPASSWD: ALL

(nevermind those reboot, halt and poweroff - it actually saves me some seconds while doing WOL stuff ;))

This then gave me power of modifying the /etc/resolve.config whose permissions are always set to root whenvever buggy NetworkManager pop up or works out (lol for not in a way it should)
So, my machine changes the dns servers to what I define at the startup so easily ;)

Then, the default gateway, which I simply deleted and added by by using "route" (of course /sbin/route has been suid'ed for everyone) instructing through:
route del default gw x.x.x.x.x (removes the one which is seutp by by buggy NetworkManager at startup)
route add default gw x.x.x.x.x (adds what i want)

And boom, my machine goes live on the internet at the startup after getting instructions to wakeonlan.... :D

-Abbas Khan