You are not logged in.

#1 2017-10-30 18:28:30

risbo981
Member
Registered: 2017-10-30
Posts: 4

Connecting to wifi with sudo

Today I installed Arch, and a problem occured. Since it's not possible to connect to a wireless network with wpa_supplicant without being root (Failed to open config file /dev/fd/63), I got stuck with a connection only on consoles.

When I try to connect with wifi-menu, the terminal writes: "Job for netctl@B.net_9788.service failed because the control process exited with error code."

Systemctl status brings out a critical line:
"Process: 2547 ExecStart=/usr/lib/netctl/network start B.net_97688 (code=exited, status=1/FAILURE)"
This occurs when running as root as well as a normal user. During installation it worked normally.

What could be the cause and what could be my way around it? I'm using KDE Plasma 5. Also sorry for the messy post (I had to write it on my phone) and thanks for any help.

Last edited by risbo981 (2017-10-30 18:32:13)

Offline

#2 2017-10-30 18:38:52

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: Connecting to wifi with sudo

risbo981 wrote:

Failed to open config file /dev/fd/63

Attain a root shell (with `sudo -i`) before running the command or use `sudo bash -c "wpa_supplicant..."` instead.

Alternatively, create a separate configuration file first with wpa_passphrase and use the -c flag to direct wpa_supplicant to it.

Check the output of this command to make sure that only a single networking .service is controlling your connection and avoid conflicts:

systemctl list-unit-files --state=enabled

Jin, Jîyan, Azadî

Offline

#3 2017-10-30 19:15:34

risbo981
Member
Registered: 2017-10-30
Posts: 4

Re: Connecting to wifi with sudo

Systemctl list-unit-files --state=enabled output:
autovt
dhcpcd
display-manager
getty
sddm
remote-fs

Opening a root bash and running the command resulted in errors:
"wlp3s0: WPA: Invalid EAPOL-Key MIC  when using TPTK - ignoring TPTK
Could not verify EAPOL-Key MIC - dropping packet
CTRL-EVENT-SCAN-FAILED
SME: Authentication request to the driver failed"

It leaves me the third option, how to change the config file?

Offline

#4 2017-10-30 19:55:50

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: Connecting to wifi with sudo

First of all disable and stop the dhcpcd service.

Offline

#5 2017-10-30 20:14:51

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: Connecting to wifi with sudo

^ +1

risbo981 wrote:

how to change the config file?

Well, I think that error message is because you already have wpa_supplicant running, see https://forums.gentoo.org/viewtopic-t-1 … art-0.html

But for the record:

# wpa_passphrase $ssid $password > /etc/wpa_supplicant.conf

Replace ${ssid,password} with the actual access point name and password, obviously.

You may want to edit the file afterwards and remove the plain text password.

The dhcpcd program can start wpa_supplicant automatically if needed:

https://wiki.archlinux.org/index.php/Dh … supplicant

But let's get the connection working before enabling any .services.

Last edited by Head_on_a_Stick (2017-10-30 20:15:18)


Jin, Jîyan, Azadî

Offline

#6 2017-10-30 20:43:09

risbo981
Member
Registered: 2017-10-30
Posts: 4

Re: Connecting to wifi with sudo

Yet it brings out same errors, + it says that the 4-step handshake failed, yet I am sure that the password is correct.

Offline

#7 2017-10-30 21:00:29

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: Connecting to wifi with sudo

ps aux | grep -E '(wpa|dhcp)'

Offline

#8 2017-10-30 21:05:11

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: Connecting to wifi with sudo

risbo981 wrote:

same errors

Try adding eapol_version=1 to wpa_supplicant.conf

https://forums.gentoo.org/viewtopic-p-8 … ml#8015970


Jin, Jîyan, Azadî

Offline

#9 2017-10-31 23:56:29

risbo981
Member
Registered: 2017-10-30
Posts: 4

Re: Connecting to wifi with sudo

Disabling dhcpcd did it for me. Plasma still doesn't recognize the connection, but I guess I'll sort it our along the way. Thank you guys very much.

Offline

Board footer

Powered by FluxBB