After my battery died and rebooting I was completely unable to connect to the internet, even though I was connected to my wifi router. I discovered that Nord VPN was pointing at the wrong DNS, exactly like in the thread. However, by this time I had already tried to uninstall Nord.
I then attempted to reinstall Nord, but upon installation, none of the CLI commands worked. Therefore I cannot use their built-in command to update the DNS.
If you are using an encrypted root partition (are you?) then there is the passphrase to unlock the encrypted partition. This is solicited very early on in the boot process. That is a completely different password as compared with the password to become root (which is the login password for whichever user you are logged in as).
It may help to specify what hardware we are talking about. Librem laptop? Librem phone? Something else?
I would always defer to @Irvinewade, but it might help all of us if you were to enumerate the steps you are taking. It is unclear me, and I see others asking questions that come to my mind.
In the meantime, my experience with VPNs is that the client will add its nameserver to /etc/resolv.conf when one logs into whatever service is being used. After that, if something untoward happens, e.g. a coredump, the nameserver data might be left behind and one cannot connect to anything. Then, the user has to manually delete the entries.
I have had this happen to me, though not on NordVPN. While I have never used NordVPN, a friend of mine does and this also happened to him, though not on Linux. We had to reset his DNS settings before things started working again.
Maybe what you want to do is not put NordVPN’s entries into resolv.conf, but let it use the DHCP default until you connect via its client. Then you should see one.
First, upon learning Nord was the issue, but before realizing that I should update the DNS I decided to uninstall Nord.
Then I attempted to access su in the terminal to change the DNS using /etc/resolv.conf, but my password didn’t work.
Upon further research, I learned that there is a command in Nord to change the DNS (second link in my OP). So I tried to reinstall Nord. However, once reinstalled none of the nord commands worked. (nord: command not found)
Here is where I am stuck.
I’m not exactly sure how to do this. I’m relatively new to linux.
Your description of steps is still a bit vague to me; I guess I was looking for some more specifics. Anyway…
I think what @irvinewade and @Dwaff are getting at is that you should us ‘sudo’ rather than ‘su’. The former allows you to use your user’s password; the latter requires the root password. You can check to make sure your user name is a member of the sudo group in /etc/group. If it is not, you may be stuck with ‘su’ to add yourself, unless the gurus here have other ideas. (And switch what follows from ‘sudo’ to ‘su’.)
I use ‘vi’ from my olden days to do edits like this. I do not want to put those instructions in here, so I hope I have this right and it will help you. Assuming you are using gnome and running from a command line in a terminal, first backup the resolv.conf, so you can recover what you have:
sudo cp /etc/resolv.conf /etc/resolv.bak
You will have to enter your user password, not root’s.
sudo gedit /etc/resolv.conf
Unless you want to use a specific, public DNS server, delete the IPv4 entries and save. (Do not put NordVPN’s in here. To my knowledge, VPN providers do not generally make their DNS servers available publicly. That is why you may not be able to resolve anything.) Then try to connect to your wifi and then to NordVPN. I hope things will work.
If things work like other VPNs, as I mentioned in my previous post, the NordVPN client will create the needed entry in resolv.conf for its DNS. When you disconnect, this entry should disappear. (I am not sure how the NordVPN client behaves. Mine has a permanent kill, so I never disconnect my VPN client itself.)
But, no matter, because I think we are closer to the problem now.
If you need to execute a command as root then
sudo whatever-the-command-is
and you will be prompted for your password.
If you need a login shell running as root then
sudo -i
You can’t out of the box do anything that requires root’s password because the root account is disabled, so best to ignore the su command. Refer: Expired root account
Thanks for the suggestions @Dwaff@Wayne@irvinewade sudo su allowed me to input commands as root.
From there I backed up resolv.conf as you recommended @Wayne. the gedit command pulled up my DNS settings file. However it was read only, and I was unable to change it.
So I attempted to remove the DNS settings with rm -r /etc/resolv.conf, but received “Operation not permitted”.
Next I tried to just edit them with nano /etc/resolv.conf. The CLI menu came up and allowed me to change the DNS settings, but alas, when I tried to exit and save it as relov.conf I received Error writing /etc/resolv.conf: Operation not permitted.
Part of your problem may be that /etc/resolv.conf may be a symbolic link. So start with
ls -l /etc/resolv.conf
On my computer that file says “Do not edit” and points out that it’s a symbolic link and, yes, it’s on a dynamic file system (on my computer) so writing it / editing it / changing it may be tricky. You would need to configure the component that is maintaining that file.
Rather than that I answer that question, I recommend you familiarise yourself with the man command. man is short for “manual” i.e. gives documentation in a shell session about each command that exists and other topics. (This documentation can usually be found online if you prefer to read the documentation in a web browser.)
So
man ls
will give you the manual (documentation) for the ls command, and that will specify all of the command options (arguments starting with -) and any optional and mandatory command arguments.