[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Editing the DNS with Network Manager Non Root



On 5/13/22 09:02, Richmond wrote:
David Christensen writes:
On 5/12/22 07:17, Richmond wrote:
David Christensen writes:
On 5/11/22 06:55, Richmond wrote:
I have a network manager applet on my xfce4 desktop. I am logged in as a
non root user, and I can select edit connections and change the IPv4
settings to DHCP address only and then put in a DNS, then save. If I
look at /etc/resolv.conf though nothing has changed. Restarting
networking or rebooting makes no difference. Perhaps this menu option
should only appear for root, or should cause an error message for non
root users?

If I choose "Automatic (DHCP) addresses only", the labels for the
second and third settings change.  Putting in some test data:

     Additional static addresses -> Add:
	Address -> 192.168.123.45
	Netmask -> 255.255.255.0
	Gateway -> 192.168.5.1

     DNS servers -> 192.168.123.45,192.168.123.67

     Search domains -> frunobulax.org

     DHCP client ID -> empty

     Require IPv4 addressing for this connection to complete -> unchecked


I then click "Save".


I then enter the root password in the pop-up that opens.


I then close the "Network Connections" window and reboot.

2022-05-12 16:10:25 dpchrist@laalaa ~
$ ls -l /etc/resolv.conf
-rw-r--r-- 1 root root 104 May 12 16:09 /etc/resolv.conf

2022-05-12 16:10:34 dpchrist@laalaa ~
$ cat /etc/resolv.conf
# Generated by NetworkManager
search frunobulax.org
nameserver 192.168.123.45
nameserver 192.168.123.67


Is this the results you expect?

I didn't put in a search domain, netmask, or gateway.


Put them in and try again. Without crawling the code, we have no idea what actually matters.


I didn't get prompted for root access. Perhaps that is the problem?


I would suspect it indicates that Network Manager does not think your network settings changed.


stat /etc/resolv.conf shows that the file has been updated but its
content doesn't change.


My /etc/resolv.conf did not change after running Network Manager; it changed after rebooting. (Is the former a bug or a feature?)


What happens if you create a new connection and use the Manual method?


If all else fails -- backup, pull the OS disk, insert a blank disk, do a fresh install, and restore. Keep meticulous records. Use a version control system. Learn a scripting language and automate sysadmin chores.


David


Reply to: