I ran into a very similar problem as the user in this thread: PureOS not able to connect to internet, accept through Tor Browser
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.
After that, I tried to update the DNS manually by following this tutorial: https://support.nordvpn.com/Connectivity/Linux/1134945702/Change-your-DNS-servers-on-Linux.htm
However, I could not become root user as my boot password for PureOS wasn’t recognized.
I am totally stuck and looking for help. Thanks in advance!
These may be two different passwords.
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 am on a Librem 14 laptop. No, I am not running an encrypted partition. I’m just on the default settings for PureOS and PureBoot.
Sorry, I meant to reply directly to your response.
OK, so can you log in at all and if so do you know the username and password to do that?
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.
Yes, I know my login credentials. When booting up my computer I have two login steps.
- Unlocking the disk
- Logging into my user profile
However, when I try to access su in the terminal neither password works.
Let’s see if I can recall the steps…
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.
Try this: do a
sudo su and use your login credentials.
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.)
OK, so you are using an encrypted partition!?!?
But, no matter, because I think we are closer to the problem now.
If you need to execute a command as root then
and you will be prompted for your password.
If you need a login shell running as root then
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
Finally got some time to come back to this.
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.
I assume this is due to the file being read only.
Progress, but not out of the woods yet.
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.
Thank you. I will give that a shot.
Would you mind telling me what that command does exactly? I like to understand what commands I’m running. (Still very new to Linux and command line).
Rather than that I answer that question, I recommend you familiarise yourself with the
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.)
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.
That is much appreciated. I will put
man to good use.
Unfortunately though, your suggested command did not work. It gave me the same result as
Again, unable to save the file.
sudo chattr -i /etc/resolv.conf
That did the trick!
After inputting that command I was able to update the NordVPN nameservers, and now I am back online.
Thanks so much for everyone’s help!