PDA

View Full Version : NetworkManager misses configuration packages



seda
2022-07-18, 09:13
I accidentally permanently deleted the configuration packages within the NetworkManager file. Ever since then, I'm not able to retrieve a wireless connection and an ethernet connection. I'm constantly offline and am therefore unable to reinstall the missing packages. I've tried the following:



Went into recovery mode to try and retrieve the packages;
Went into cache to reinstall the debian package which contains those NetworkManager configuration packages;
Use an ethernet cable;
Used the
systemctl restart NetworkManager command;
And set Managed=true In r.conf.


Extra information:


ifconfig only outputs
lo. So far, I've been unable to ouput
wlan0 and
eth0 anywhere while those were outputted before deleting the configuration files.

/etc/network/interfaces.d contains this information:

auto lo
iface lo inet loopback

I personally thought of downloading the missing packages onto a USB, loading them into the correct file and use a reboot. If this is possible, could anyone provide me with a link that directly directs me to the downloadable packages? If not, I'd appreciate every bit of help to make my laptop connect to WiFi again! Thanks in advance.

Fred Sheehan
2022-08-06, 16:42
You could try rebuilding your set up first (* If you've broken it beyond this, then re-install your Kali it will be easier!)

find the name of your wireless interface;

iwconfig

this will return the name of your WiFi adapter, in my case it was wlp3s0b1 so this will be used in the rest of the examples where needed, replace this with the name of your own adapter. (wlan0 for example)
Next, using the Network name (SSID of the router) and the WPA2 Password (the pre shared key from your router) set up the WPA Supplicant file to connect via WPA2 using the following syntax;

sudo wpa_passphrase NetworkSSID PreSharedKey /etc/wpa_supplicant.conf

Note that there is only a single space between items, this will create the file wpa_supplicant.conf and populated it with the network name, network password (commented out), and a generated Hex value password key that the system will actually use instead of the plain text password you've just given.
Now, we will make the adapter use this new file;

sudo wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlp3s0b1

The -B tells it to send this to the background, and the -i is for the adapter, mine was wlp3s0b1 replace this with your own found earlier.
Next, we just need an IP address issued;

dhclient wlp3s0b1

That's it for WiFi, you should now be connected to the internet..