F36 live has build tools! but it does not connect wifi

Hi I’m new to linux and never used Fedora.
I want to test F36 on a laptop
i7 1st - 8G - nvidia 310m

STORY
I can connect it via ethernet (rj45) but I challenged myself to connect it via wifi via wpa_supplicant…

I think I’ve done everything right but I don’t get any ip.
Then I see that the dhcpd service does not exist

To make it more complicated I searched and searched for the files to compile dhpd and did it. To my surprise, the F36 live has all the compilation tools. Although it compiled and installed correctly, it did not work.

So I started looking for the rpm and found this one: https://kojipkgs.fedoraproject.org//packages/dhcp/4.4.3/4.P1.fc36/x86_64/dhcp-client-4.4.3-4.P1. fc36.x86_64.rpm
I tried to install locally but dnf always tries to connect to the internet, I guess it does this to validate the package or to resolve dependencies. So I couldn’t do it either.

And already in the depths of the novice dreamer, I unzipped the rpm and manually put the files in the supposedly correct locations, but it didn’t work for me and so I gave up.

FINALLY THE PROBLEM IN QUESTION
I decide to connect from the graphical mode from the GNOME menu

And the problem is that I put the WPA2/Personal key with which I connect any device and it turns out that it doesn’t accept it…

I know that the problem is very specific but if someone can guide me… what could be the origin of this authentication problem with the wifi router.

Thank you

Welcome to ask :fedora:

First, you should not need to install anything related to dhcp on your laptop for connection to a router, either by wifi or ethernet. Fedora is already configured to work that way.
If it worked for ethernet it would also work for wifi.

Thus the issue is really connecting to your wifi AP.

  1. Does the wifi AP show in the available networks with wifi when you use the connect button at the top right of the screen?
  2. first clicking on the icons in the upper corner should give you this
    Screenshot from 2022-10-31 17-33-12
  3. then clicking on the wifi icon and connect should give you this
    Screenshot from 2022-10-31 17-34-44
    Do you see your AP name (or any SSID) in the list shown?

If you do then simply select the chosen SSID and connect. If not then we need to identify why not.

Having already placed files into locations instead of doing the normal install with the package manager may present problems, and especially since you did an install from a package downloaded from koji and we don’t know if it was the correct version, or if the files were placed in the proper location.

In an attempt to verify that files are located as expected and the versions expected I would suggest that you do sudo dnf distro-sync --allowerasing --refresh and allow the system to complete that fully then try the wifi connection after the sync completes.

If the wifi SSID cannot be seen then we need to approach that issue on its own, without further off-the-wall attempts to fix it.

Thank you very much for the reply
About points 1, 2 and 3
Yes, of course, the signal appears in graphic mode and as I said in my query… I try to connect but it cannot establish a connection and it asks me for the Wi-Fi password again.

I deleted and reconfigured the wifi router settings and now it connects correctly from graphical mode in GNOME

Ok, the wifi works! I rule out driver incompatibilities or some other weird problem

So I tried wpa_supplicant again and it returns:

Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
[...]
nl80211: kernel reports: Match already configured
wlp3s0: SME: Trying to authenticate with 40:bf:17:51:af:f7 (SSID='EBD' freq=2462 MHz)
wlp3s0: Trying to associate with 40:bf:17:51:af:f7 (SSID='EBD' freq=2462 MHz)
wlp3s0: Associated with 40:bf:17:51:af:f7
wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlp3s0: WPA: Key negotiation completed with 40:bf:17:51:af:f7 [PTK=CCMP GTK=CCMP]
wlp3s0: CTRL-EVENT-CONNECTED - Connection to 40:bf:17:51:af:f7 completed [id=0 id_str=]

but nmcli says:

wlp3s0: disconnected
        "Qualcomm Atheros AR9285"
        wifi (ath9k), 8E:72:56:A8:D0:6B, hw, mtu 1500

And NetworkManager is running

what am I missing?
any suggestion?
Thank you very much

After doing a new boot, then connecting the wifi but NOT doing anything with wpa_supplicant, what is the result of systemctl status wpa_supplicant.service?
Please post that output.

before connecting the wifi

● wpa_supplicant.service - WPA supplicant
     Loaded: loaded (/usr/lib/systemd/system/wpa_supplicant.service; disabled; vendor preset: disabled)
     Active: active (running) since Wed 2022-11-02 16:46:48 EDT; 1min 16s ago
   Main PID: 1362 (wpa_supplicant)
      Tasks: 1 (limit: 9277)
     Memory: 4.9M
        CPU: 142ms
     CGroup: /system.slice/wpa_supplicant.service
             └─1362 /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -u -s

Nov 02 16:46:48 localhost-live systemd[1]: Starting wpa_supplicant.service - WPA supplicant...
Nov 02 16:46:48 localhost-live systemd[1]: Started wpa_supplicant.service - WPA supplicant.
Nov 02 16:46:48 localhost-live wpa_supplicant[1362]: Successfully initialized wpa_supplicant

After


● wpa_supplicant.service - WPA supplicant
     Loaded: loaded (/usr/lib/systemd/system/wpa_supplicant.service; disabled; vendor preset: disabled)
     Active: active (running) since Wed 2022-11-02 19:08:21 EDT; 3h 58min left
   Main PID: 1375 (wpa_supplicant)
      Tasks: 1 (limit: 9277)
     Memory: 5.1M
        CPU: 325ms
     CGroup: /system.slice/wpa_supplicant.service
             └─1375 /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -u -s

Nov 02 19:10:13 localhost-live wpa_supplicant[1375]: wlp3s0: WPS-CANCEL
Nov 02 19:10:13 localhost-live wpa_supplicant[1375]: wlp3s0: SME: Trying to authenticate with 40:bf:17:51:af:f7 (SSID='EBD' freq=2462 MHz)
Nov 02 19:10:13 localhost-live wpa_supplicant[1375]: wlp3s0: Trying to associate with 40:bf:17:51:af:f7 (SSID='EBD' freq=2462 MHz)
Nov 02 19:10:13 localhost-live wpa_supplicant[1375]: wlp3s0: Associated with 40:bf:17:51:af:f7
Nov 02 19:10:13 localhost-live wpa_supplicant[1375]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Nov 02 19:10:14 localhost-live wpa_supplicant[1375]: wlp3s0: WPA: Key negotiation completed with 40:bf:17:51:af:f7 [PTK=CCMP GTK=CCMP]
Nov 02 19:10:14 localhost-live wpa_supplicant[1375]: wlp3s0: CTRL-EVENT-CONNECTED - Connection to 40:bf:17:51:af:f7 completed [id=0 id_str=]
Nov 02 19:10:15 localhost-live wpa_supplicant[1375]: wlp3s0: CTRL-EVENT-BEACON-LOSS
Nov 02 19:10:16 localhost-live wpa_supplicant[1375]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-33 noise=-95 txrate=65000
Nov 02 15:09:41 localhost-live wpa_supplicant[1375]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-26 noise=-95 txrate=65000

I remind you that I am in live mode

Got a breakthrough!
with


dhclient -v wlp3s0

Now I have ip, I can ping the local ip, router and google

But I need to obtain the DNS so it is not possible for me to consume the internet

If you can ping google then it seems you have internet.
Are you pinging by IP or by FQDN? IP does not use dns but FQDN does.

ping to 8.8.8.8 then it works
but ping to google.com doesn’t work…

Go to Network Settings in the settings app, then click on your networks name. Scroll down to ipv4 settings. Enter 9.9.9.9 (or your prefered DNS) under Nameserver. Do the same for the ipv6 settings, but using a ipv6 ip.

Now this is because your router is either not setting the nameserver, or using a broken nameserver. If you have access to your routers settings, try changing the DNS option to a standard DNS resolver.

The router configuration is correct since all the devices that I use regularly connect correctly, and in fact I have already verified that from this live session I can connect correctly using the GNOME graphical environment. Evidently you did not read my query, but thanks for answering.

The objective is to connect to the internet through wpa_supplcant from the live session, without touching anything graphic.
I am missing getting the DNS configured on the router to be able to get an internet connection and I am very close to achieving it!

DNS configured on the router has nothing to do with your fedora machine. The only thing the fedora machine needs is for dhcp to tell the PC that the router is its dns server.

That config is very standard and automatic and really should need nothing extra to be done at the PC once the dhcp server (router) assigns the IP and provides the other required info. It certainly should not require user intervention for wpa_supplicant to just work by default.

Any new install I have ever done in over 15 years has dns working properly as soon as the network connection to the router with dhcp is established.

In fact, since the router gets its config via dhcp from the ISP it also gets its dns config from the ISP. All is normally done automatically with no user alterations needed.

no no no no Sorry about that, I wrote wrong.
What I meant to say is that I need to obtain the dns specified in my router (which are those of google) to be able to navigate.

In Archlinux and Debian wpa_supplicant works for me at first, I think there is something like a service or an option that is missing and that is obviously different in Fedora live.

I’ll keep looking, thanks

I did not notice that you dont want to use the GUI. In that case you can use nmcli or nmtui, the arch wiki has good docs for them.

Sometimes an ISP router will set the auto DNS to their (broken adware infested) DNS server…

I discarded NetworManager because that service does not exist in arch in live mode and wpa_suplicant works on the first try…


I found the problem, I need help to solve it because I don’t know how to continue.

The systemd-resolved service writes to the /etc/resolv.conf file

nameserver 127.0.0.53
options edns0 trust-ad
search .

and when i run dhclient

automatically runs
/usr/sbin/dhclient-script

This tries to write the new configuration taken from the router

options edns0 trust-ad
; generated by /usr/sbin/dhclient-script
search locally
nameserver 192.168.0.1

But the script can’t, it gets a permission denied
/usr/sbin/dhclient-script: line 706: /etc/resolv.conf Permission denied

So what I did was for the systemd-resolved service and manually edit /etc/resolv.conf

stop and start dhclient and now internet works

I would like to know why the script receives that permission denied…

The default /etc/resolv.conf file is actually a symlink to /run/systemd/resolve/stub-resolf.conf.

$ ls -l /etc/resolv.conf
lrwxrwxrwx. 1 root root 39 Jul 17 02:18 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

Fedora uses systemd-resolve.service to manage the content of the file under /run and that file is owned by systemd-resolve. It also is on the virtual file system in /run so is recreated at every boot.

You can replace /etc/resolv.conf with an actual file so that your config is retained permanently, which is apparently what you did.

In Archlinux it also uses the same service and this problem does not exist.
So what I thought is that the script does not belong to the group of users authorized to edit resolved.conf

But…

I edited the script so that the configuration is written to another file in another location without permission problems

/home/liveuser/resolve.conf

And to my surprise I get the same permission denied message!!

To know what the script wants to dump, I had to print it to the screen.


This is already completely off topic, but it’s interesting to know why this happens…

The correct file name is resolv.conf. No e on the end of resolv in that file name.

The ‘liveuser’ is not root, and making changes anywhere except in the users home directory is subject to the same restrictions as on an installed system. Your script would need to be run by liveuser (or root) to be able to write to /home/liveuser/

And, no it is not necessarily off topic if the problem with dns caused it to appear your wifi was not connecting.

Remember, the failing of permissions with a live environment is that you are running in a virtual file system and cannot make lasting changes to the actual system files. Some can be modified but most not. Any changes made are also temporary and only last until the next shutdown or restart.

You can for example (assuming you have adequate RAM) do a full system upgrade, but the next boot will start over with only what is on the live media used to boot.

yes of course

but dhclient runs only as root…
Should the script inherit the permissions…
And in the case of not inheriting permissions you should be able to write to the live user folder…

If you were to do su - first it will switch you to the root user (no password required in live environment) then you can do all needed as root. Once completed with that thenexit will return you from root to the liveuser environment.